diff options
-rw-r--r-- | metadata/accounts/groups/bacula.conf | 0 | ||||
-rw-r--r-- | metadata/accounts/users/bacula.conf | 4 | ||||
-rw-r--r-- | metadata/arch.conf | 2 | ||||
-rw-r--r-- | packages/app-backup/bacula/bacula-scm.exheres-0 | 342 |
4 files changed, 175 insertions, 173 deletions
diff --git a/metadata/accounts/groups/bacula.conf b/metadata/accounts/groups/bacula.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/metadata/accounts/groups/bacula.conf diff --git a/metadata/accounts/users/bacula.conf b/metadata/accounts/users/bacula.conf new file mode 100644 index 0000000..fc759eb --- /dev/null +++ b/metadata/accounts/users/bacula.conf @@ -0,0 +1,4 @@ +pecos = Bacula backup solution +home = /dev/null +shell = /sbin/nologin +primary_group = bacula diff --git a/metadata/arch.conf b/metadata/arch.conf deleted file mode 100644 index 1677fa6..0000000 --- a/metadata/arch.conf +++ /dev/null @@ -1,2 +0,0 @@ -amd64 -x86 diff --git a/packages/app-backup/bacula/bacula-scm.exheres-0 b/packages/app-backup/bacula/bacula-scm.exheres-0 index 2b323fa..bf0c8ef 100644 --- a/packages/app-backup/bacula/bacula-scm.exheres-0 +++ b/packages/app-backup/bacula/bacula-scm.exheres-0 @@ -1,4 +1,6 @@ # Distributed under the terms of the GNU General Public License v2 +# Copyright 1999-2018 Gentoo Foundation +# Copyright 2018 Gluzskiy Alexandr <sss@sss.chaoslab.ru> SCM_REPOSITORY="http://git.bacula.org/bacula.git" @@ -11,170 +13,167 @@ SLOT="0" PLATFORMS="~amd64 ~x86" SUMMARY="Featureful client/server network backup suite" -HOMEPAGE="http://www.bacula.org/" +HOMEPAGE="https://blog.bacula.org" LICENCES="AGPL-3" MYOPTIONS=" - acl - bacula-clientonly - bacula-nodir - bacula-nosd - examples - ipv6 - logwatch - qt5 - readline - ssl - tcpd - vim-syntax - X - ssl? ( providers: - libressl - openssl - ) - [[ number-selected = exactly-one ]] - !bacula-clientonly? ( - mysql - postgres - sqlite - ) - [[ number-selected = exactly-one ]] + acl + minimal + bacula-nodir + bacula-nosd + examples + ipv6 + logwatch + qt5 + readline + ssl + tcpd + vim-syntax + X + ssl? ( providers: + libressl + openssl + ) + [[ number-selected = exactly-one ]] + !minimal? ( + mysql + postgres + sqlite + ) + [[ number-selected = exactly-one ]] " DEPENDENCIES=" - build: - dev-libs/gmp - !bacula-clientonly? ( - postgres? ( dev-db/postgresql ) - mysql? ( virtual/mysql ) - sqlite? ( dev-db/sqlite ) - !bacula-nodir? ( virtual/mta ) - ) - qt5? ( - x11-libs/qwt[qt5] - x11-libs/qtsvg:5 - ) - logwatch? ( sys-apps/logwatch ) - tcpd? ( sys-apps/tcp-wrappers ) - readline? ( sys-libs/readline ) - acl? ( sys-apps/acl ) - sys-libs/zlib - app-arch/lzo - sys-libs/ncurses - ssl? ( - providers:libressl? ( dev-libs/libressl ) - providers:openssl? ( dev-libs/openssl ) - ) - build+run: - !bacula-clientonly? ( - !bacula-nosd? ( - sys-block/mtx - app-arch/mt-st - ) - - ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + build+run: + app-arch/lzo + dev-libs/gmp:6 + sys-libs/ncurses + sys-libs/zlib + acl? ( sys-apps/acl ) + logwatch? ( sys-apps/logwatch ) + !minimal? ( + postgres? ( dev-db/postgresql ) + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite ) + !bacula-nodir? ( virtual/mta ) + !bacula-nosd? ( + sys-block/mtx + app-arch/mt-st + ) + ) + qt5? ( + x11-libs/qwt[qt5] + x11-libs/qtsvg:5 + ) + readline? ( sys-libs/readline:7 ) + ssl? ( + providers:libressl? ( dev-libs/libressl ) + providers:openssl? ( dev-libs/openssl ) + ) + tcpd? ( sys-apps/tcp-wrappers ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + user/bacula + group/bacula " WORK="${WORK}"/bacula pkg_setup() { - option mysql && export mydbtype="mysql" - option postgres && export mydbtype="postgresql" - option sqlite && export mydbtype="sqlite3" - #TODO: create group and user + option mysql && export mydbtype="mysql" + option postgres && export mydbtype="postgresql" + option sqlite && export mydbtype="sqlite3" } src_prepare() { - edo pushd src >&/dev/null - for f in console/console.c dird/dird.c filed/filed.c \ - stored/bcopy.c stored/bextract.c stored/bls.c \ - stored/bscan.c stored/btape.c stored/stored.c \ - qt-console/main.cpp; do - edo sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" - done - popd >&/dev/null || die - edo sed -i -e 's/Application;//' scripts/bat.desktop.in - edo sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in - expatch -p0 "${FILES}"/7.2.0/${PN}-7.2.0-doc.patch - expatch "${FILES}"/5.2.3/${PN}-5.2.3-as-needed.patch - expatch -p0 "${FILES}"/9.0.2/${PN}-9.0.2-lib-search-path.patch - expatch -p0 "${FILES}"/9.0.6/${PN}-9.0.6-bat-pro.patch - expatch -p0 "${FILES}"/5.2.3/${PN}-5.2.3-openssl-1.patch - expatch -p0 "${FILES}/bacula-fix-sonames.patch" - edo sed -i -e "s/strip /# strip /" src/filed/Makefile.in - edo sed -i -e "s/strip /# strip /" src/console/Makefile.in - expatch -p0 "${FILES}"/7.0.2/${PN}-7.0.2-depend.patch - edo sed -i -e '/Requires/d' platforms/systemd/*.service.in - edo sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in - edo sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in - edo sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in - edo sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \ - src/qt-console/bat.pro.in - edo mkdir src/qt-console/.libs - edo touch src/qt-console/.libs/bat - edo chmod 755 src/qt-console/.libs/bat - expatch -p0 "${FILES}"/9.0.6/${PN}-9.0.6-libressl.patch - edo mv autoconf/libtool autoconf/libtool1 - - default + edo pushd src >&/dev/null + for f in console/console.c dird/dird.c filed/filed.c \ + stored/bcopy.c stored/bextract.c stored/bls.c \ + stored/bscan.c stored/btape.c stored/stored.c \ + qt-console/main.cpp; do + edo sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" + done + edo popd >&/dev/null + edo sed -i -e 's/Application;//' scripts/bat.desktop.in + edo sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in + expatch -p0 "${FILES}"/7.2.0/${PN}-7.2.0-doc.patch + expatch "${FILES}"/5.2.3/${PN}-5.2.3-as-needed.patch + expatch -p0 "${FILES}"/9.0.2/${PN}-9.0.2-lib-search-path.patch + expatch -p0 "${FILES}"/9.0.6/${PN}-9.0.6-bat-pro.patch + expatch -p0 "${FILES}"/5.2.3/${PN}-5.2.3-openssl-1.patch + expatch -p0 "${FILES}/bacula-fix-sonames.patch" + edo sed -i -e "s/strip /# strip /" src/filed/Makefile.in + edo sed -i -e "s/strip /# strip /" src/console/Makefile.in + expatch -p0 "${FILES}"/7.0.2/${PN}-7.0.2-depend.patch + edo sed -i -e '/Requires/d' platforms/systemd/*.service.in + edo sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in + edo sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in + edo sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in + edo sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \ + src/qt-console/bat.pro.in + edo mkdir src/qt-console/.libs + edo touch src/qt-console/.libs/bat + edo chmod 755 src/qt-console/.libs/bat + expatch -p0 "${FILES}"/9.0.6/${PN}-9.0.6-libressl.patch + edo mv autoconf/libtool autoconf/libtool1 + + default } src_configure() { - local myconf=() - if option bacula-clientonly; then - myconf+=( - $(option_enable bacula-clientonly client-only) - ) - else - myconf+=( - $(option_enable !bacula-nodir build-dird) - $(option_enable !bacula-nosd build-stored) - --with-${mydbtype} - ) - if option mysql; then - myconf+=( --disable-batch-insert ) - else - myconf+=( --enable-batch-insert ) - fi - fi - econf \ - "${myconf[@]}" \ - $(option_enable qt5 bat) \ - $(option_with X x) \ - $(option_enable !readline conio) \ - $(option_enable readline) \ - $(option_with ssl openssl) \ - $(option_enable acl) \ - $(option_enable ipv6) \ - $(option_with tcpd tcp-wrappers) \ - --with-dir-user=bacula \ - --with-dir-group=bacula \ - --with-sd-user=root \ - --with-sd-group=bacula \ - --with-fd-user=root \ - --with-fd-group=bacula \ - --with-scriptdir=/usr/$(exhost --target)/libexec/bacula \ - --with-working-dir=/var/lib/bacula \ - --with-subsys-dir=/var/lock/subsys \ - --sysconfdir=/etc/bacula \ - --with-pid-dir=/var/run \ - --libdir=/usr/$(exhost --target)/lib \ - --enable-smartalloc \ - --disable-afs \ - + local myconf=() + if option minimal; then + myconf+=( + $(option_enable minimal client-only) + ) + else + myconf+=( + $(option_enable !bacula-nodir build-dird) + $(option_enable !bacula-nosd build-stored) + --with-${mydbtype} + ) + if option mysql; then + myconf+=( --disable-batch-insert ) + else + myconf+=( --enable-batch-insert ) + fi + fi + econf \ + "${myconf[@]}" \ + $(option_enable qt5 bat) \ + $(option_with X x) \ + $(option_enable !readline conio) \ + $(option_enable readline) \ + $(option_with ssl openssl) \ + $(option_enable acl) \ + $(option_enable ipv6) \ + $(option_with tcpd tcp-wrappers) \ + --with-dir-user=bacula \ + --with-dir-group=bacula \ + --with-sd-user=root \ + --with-sd-group=bacula \ + --with-fd-user=root \ + --with-fd-group=bacula \ + --with-scriptdir=/usr/$(exhost --target)/libexec/bacula \ + --with-working-dir=/var/lib/bacula \ + --with-subsys-dir=/var/lock/subsys \ + --sysconfdir=/etc/bacula \ + --with-pid-dir=/var/run \ + --libdir=/usr/$(exhost --target)/lib \ + --enable-smartalloc \ + --disable-afs \ + } src_compile() { - emake NO_ECHO="" + emake NO_ECHO="" } src_install() { - default - rm -f "${IMAGE}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} + default + edo rm -f "${IMAGE}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} # extra files which 'make install' doesn't cover - if ! option bacula-clientonly; then + if ! option minimal; then # the database update scripts diropts -m0750 insinto "${IMAGE}"/usr/$(exhost --target)/libexec/bacula/updatedb @@ -198,38 +197,38 @@ src_install() { dodir /etc/logwatch/conf/services edo pushd "${WORK}"/scripts/logwatch >&/dev/null emake install - popd >&/dev/null || die + edo popd >&/dev/null fi fi - if ! option qt5; then - rm -vf "${IMAGE}"/usr/share/man/man1/bat.1* + if ! option qt5; then + edo rm -vf "${IMAGE}"/usr/share/man/man1/bat.1* fi - rm -vf "${IMAGE}"/usr/share/man/man1/bacula-tray-monitor.1* - - if option bacula-clientonly || option bacula-nodir; then - rm -vf "${IMAGE}"/usr/share/man/man8/bacula-dir.8* - rm -vf "${IMAGE}"/usr/share/man/man8/dbcheck.8* - rm -vf "${IMAGE}"/usr/share/man/man1/bsmtp.1* - rm -vf "${IMAGE}"/usr/libexec/bacula/create_*_database - rm -vf "${IMAGE}"/usr/libexec/bacula/drop_*_database - rm -vf "${IMAGE}"/usr/libexec/bacula/make_*_tables - rm -vf "${IMAGE}"/usr/libexec/bacula/update_*_tables - rm -vf "${IMAGE}"/usr/libexec/bacula/drop_*_tables - rm -vf "${IMAGE}"/usr/libexec/bacula/grant_*_privileges - rm -vf "${IMAGE}"/usr/libexec/bacula/*_catalog_backup + edo rm -vf "${IMAGE}"/usr/share/man/man1/bacula-tray-monitor.1* + + if option minimal || option bacula-nodir; then + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/bacula-dir.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/dbcheck.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man1/bsmtp.1* + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/create_*_database + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/drop_*_database + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/make_*_tables + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/update_*_tables + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/drop_*_tables + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/grant_*_privileges + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/*_catalog_backup fi - if option bacula-clientonly || option bacula-nosd; then - rm -vf "${IMAGE}"/usr/share/man/man8/bacula-sd.8* - rm -vf "${IMAGE}"/usr/share/man/man8/bcopy.8* - rm -vf "${IMAGE}"/usr/share/man/man8/bextract.8* - rm -vf "${IMAGE}"/usr/share/man/man8/bls.8* - rm -vf "${IMAGE}"/usr/share/man/man8/bscan.8* - rm -vf "${IMAGE}"/usr/share/man/man8/btape.8* - rm -vf "${IMAGE}"/usr/libexec/bacula/disk-changer - rm -vf "${IMAGE}"/usr/libexec/bacula/mtx-changer - rm -vf "${IMAGE}"/usr/libexec/bacula/dvd-handler + if option minimal || option bacula-nosd; then + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/bacula-sd.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/bcopy.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/bextract.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/bls.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/bscan.8* + nonfatal edo rm -vf "${IMAGE}"/usr/share/man/man8/btape.8* + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/disk-changer + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/mtx-changer + nonfatal edo rm -vf "${IMAGE}"/usr/libexec/bacula/dvd-handler fi if option examples; then @@ -245,10 +244,11 @@ src_install() { newins scripts/filetype.vim bacula_ft.vim fi - edo rmdir "${IMAGE}"/usr/share/man/man1 - edo rmdir "${IMAGE}"/tmp - edo rmdir "${IMAGE}"/opt/bacula/log - edo rmdir "${IMAGE}"/opt/bacula - edo rmdir "${IMAGE}"/opt - edo touch "${IMAGE}"/var/lib/bacula/.keep + edo rmdir "${IMAGE}"/usr/share/man/man1 + edo rmdir "${IMAGE}"/tmp + edo rmdir "${IMAGE}"/opt/bacula/log + edo rmdir "${IMAGE}"/opt/bacula + edo rmdir "${IMAGE}"/opt + keepdir "${IMAGE}"/var/lib/bacula } + |