-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix build by using sources and linking with libmysqlservices.a #5
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,48 @@ MAINTAINER Anton Povarov "anton.povarov@gmail.com" | |
|
||
RUN dnf install -y git-core gcc gcc-c++ boost-devel cmake autoconf automake libtool mariadb-devel | ||
RUN dnf install -y file hostname mariadb-server | ||
RUN dnf install -y dnf-plugins-core rpm-build | ||
RUN dnf builddep -y mariadb | ||
|
||
RUN useradd builder -u 1000 -m -G users,wheel && \ | ||
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \ | ||
echo "# macros" > /home/builder/.rpmmacros && \ | ||
echo "%_topdir /home/builder/rpm" >> /home/builder/.rpmmacros && \ | ||
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \ | ||
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \ | ||
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \ | ||
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \ | ||
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \ | ||
mkdir /home/builder/rpm && \ | ||
chown -R builder /home/builder | ||
|
||
USER builder | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkevac what was the goal of the dedicated user and why we can do it under current? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rpmbuild refuses to build as a root user |
||
WORKDIR /home/builder | ||
|
||
RUN dnf download --source mariadb | ||
RUN rpm -i mariadb*.rpm | ||
|
||
WORKDIR /home/builder/rpm | ||
RUN rpmbuild --nocheck -bi mariadb.spec | ||
|
||
# RUN echo 'test5' > test && rm test | ||
|
||
USER root | ||
WORKDIR /root | ||
|
||
RUN mkdir -p /_src && cd /_src && \ | ||
git clone https://github.com/anton-povarov/pinba2 && \ | ||
# git clone --branch=fix_lib https://github.com/mkevac/pinba2 && \ | ||
git clone https://github.com/badoo/pinba2 && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkevac oh now this is official but Please consider updating links to new repo / web page here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, there are many improvements here that can be made. I wanted to fix build issue first for you to be able to use this thing at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docs were moved as well: |
||
git clone https://github.com/anton-povarov/meow && \ | ||
git clone https://github.com/nanomsg/nanomsg ; | ||
|
||
RUN /_src/pinba2/docker/build-from-source.sh | ||
|
||
RUN dnf remove -y git-core gcc gcc-c++ boost-devel cmake autoconf automake libtool mariadb-devel && \ | ||
dnf remove -y dnf-plugins-core rpm-build && \ | ||
dnf autoremove -y && \ | ||
dnf clean all | ||
dnf clean all && \ | ||
rm -rf /home/builder/rpm/* | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
RUN ln -snf /usr/local/bin/docker-entrypoint.sh / | ||
|
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.
@mkevac this will fail with next release of MariaDB. We should either get the directory name dynamically or explicitly set versions in
Dockerfile
.