Skip to content

Commit

Permalink
Remove override-stage
Browse files Browse the repository at this point in the history
Current `override-stage` has no effect on final rock

I inspected the rock we're currently building (i.e. ghcr.io/canonical/charmed-mysql:8.0.37-22.04_edge), and it looks like it doesn't contain `/var/lib/mysql`
```
root@foo-0:/# find / -name mysql
/home/mysql
/usr/lib/x86_64-linux-gnu/perl5/5.34/DBD/mysql
/usr/lib/x86_64-linux-gnu/perl5/5.34/auto/DBD/mysql
/usr/lib/mysql
/usr/share/mysql
/usr/bin/mysql
/var/log/mysql
/etc/init.d/mysql
/etc/mysql
root@foo-0:/# mysqld --initialize-insecure -u mysql
root@foo-0:/# find / -name mysql
/home/mysql
/usr/lib/x86_64-linux-gnu/perl5/5.34/DBD/mysql
/usr/lib/x86_64-linux-gnu/perl5/5.34/auto/DBD/mysql
/usr/lib/mysql
/usr/share/mysql
/usr/bin/mysql
/var/log/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/etc/init.d/mysql
/etc/mysql
```

so I think the entire `override-stage` in our rock is doing nothing
  • Loading branch information
carlcsaposs-canonical committed Jun 28, 2024
1 parent 20100e8 commit e715708
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,6 @@ parts:
- python3-yaml
stage-snaps:
- charmed-mysql/8.0/edge
override-stage: |
LIB_DIR=$CRAFT_STAGE/usr/lib/x86_64-linux-gnu
craftctl default
mkdir -p $CRAFT_STAGE/var/lib/mysql
ln -sf $LIB_DIR/libnuma.so.1 \
/usr/lib/x86_64-linux-gnu/libnuma.so.1
ln -sf $LIB_DIR/libaio.so.1 \
/usr/lib/x86_64-linux-gnu/libaio.so.1
ln -sf $LIB_DIR/libicuuc.so.70 \
/usr/lib/x86_64-linux-gnu/libicuuc.so.70
ln -sf $LIB_DIR/libicui18n.so.70 \
/usr/lib/x86_64-linux-gnu/libicui18n.so.70
ln -sf $LIB_DIR/libevent_core-2.1.so.7 \
/usr/lib/x86_64-linux-gnu/libevent_core-2.1.so.7
ln -sf $LIB_DIR/libevent_pthreads-2.1.so.7 \
/usr/lib/x86_64-linux-gnu/libevent_pthreads-2.1.so.7
ln -sf $LIB_DIR/libprotobuf-lite.so.23 \
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23
ln -sf $LIB_DIR/libicudata.so.70 \
/usr/lib/x86_64-linux-gnu/libicudata.so.70
rm -rf /var/lib/mysql/
mysqld --initialize
cp -r /var/lib/mysql $CRAFT_STAGE/var/lib
chown 584788:584788 $CRAFT_STAGE/var/lib/mysql
override-prime: |
craftctl default
mv -f $CRAFT_PRIME/etc/mysql/mysql.cnf $CRAFT_PRIME/etc/mysql/my.cnf
Expand Down

0 comments on commit e715708

Please sign in to comment.