-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build & release arm64 #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update README (same as snap) and please create backlog ticket to add tests here.
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
26ca512
to
a6b72a8
Compare
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
opened #47 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good cleanup
shell: python | ||
run: | | ||
import pathlib | ||
import subprocess | ||
|
||
for rock_file in pathlib.Path(".").glob("*.rock"): | ||
subprocess.run( | ||
["syft", rock_file.name, "--output", f"spdx-json={rock_file.name}.spdx.json"], | ||
check=True, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good ol shell?
shell: python | |
run: | | |
import pathlib | |
import subprocess | |
for rock_file in pathlib.Path(".").glob("*.rock"): | |
subprocess.run( | |
["syft", rock_file.name, "--output", f"spdx-json={rock_file.name}.spdx.json"], | |
check=True, | |
) | |
shell: bash | |
run: | | |
for rock_file in *.rock | |
do | |
syft "${rock_file}" --output spdx-json="${rock_file}".spdx.json | |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'll probably move to reusable workflows at some point
to keep consistent with postgres repo, not changing for now
No description provided.