Skip to content

Commit

Permalink
chore: Release 23.5.0 + 4.1.3 (#19)
Browse files Browse the repository at this point in the history
chore: PKGBUILD: default systemd activation for rhel9
  • Loading branch information
M0Rf30 committed May 2, 2024
1 parent 2cbcb3b commit 9a7bf3f
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 23 deletions.
58 changes: 39 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,37 @@ pipeline {
}
}

stage('RHEL') {
stage('RHEL8') {
agent {
node {
label 'yap-agent-rocky-8-v2'
}
}
steps {
unstash 'staging'
sh 'sudo yap build rocky . -s'
stash includes: 'artifacts/x86_64/*.rpm', name: 'artifacts-rpm'
sh 'sudo yap build rocky-8 . -s'
stash includes: 'artifacts/x86_64/*el8*.rpm', name: 'artifacts-rhel8'
}
post {
always {
archiveArtifacts artifacts: "artifacts/x86_64/*.rpm", fingerprint: true
archiveArtifacts artifacts: "artifacts/x86_64/*el8*.rpm", fingerprint: true
}
}
}
stage('RHEL9') {
agent {
node {
label 'yap-agent-rocky-9-v2'
}
}
steps {
unstash 'staging'
sh 'sudo yap build rocky-9 . -s'
stash includes: 'artifacts/x86_64/*el9*.rpm', name: 'artifacts-rhel9'
}
post {
always {
archiveArtifacts artifacts: "artifacts/x86_64/*el9*.rpm", fingerprint: true
}
}
}
Expand All @@ -75,7 +92,8 @@ pipeline {
}
steps {
unstash 'artifacts-deb'
unstash 'artifacts-rpm'
unstash 'artifacts-rhel8'
unstash 'artifacts-rhel9'
script {
def server = Artifactory.server 'zextras-artifactory'
def buildInfo
Expand All @@ -90,13 +108,13 @@ pipeline {
"props": "deb.distribution=focal;deb.distribution=jammy;deb.component=main;deb.architecture=amd64"
},
{
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).rpm",
"target": "centos8-playground/zextras/{1}/{1}-{2}.rpm",
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).el8.x86_64.rpm",
"target": "centos8-playground/zextras/{1}/{1}-{2}.el8.x86_64.rpm",
"props": "rpm.metadata.arch=x86_64;rpm.metadata.vendor=zextras"
},
{
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).rpm",
"target": "rhel9-playground/zextras/{1}/{1}-{2}.rpm",
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).el9.x86_64.rpm",
"target": "rhel9-playground/zextras/{1}/{1}-{2}.el9.x86_64.rpm",
"props": "rpm.metadata.arch=x86_64;rpm.metadata.vendor=zextras"
}
]
Expand All @@ -111,7 +129,8 @@ pipeline {
}
steps {
unstash 'artifacts-deb'
unstash 'artifacts-rpm'
unstash 'artifacts-rhel8'
unstash 'artifacts-rhel9'
script {
def server = Artifactory.server 'zextras-artifactory'
def buildInfo
Expand All @@ -126,13 +145,13 @@ pipeline {
"props": "deb.distribution=focal;deb.distribution=jammy;deb.component=main;deb.architecture=amd64"
},
{
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).rpm",
"target": "centos8-devel/zextras/{1}/{1}-{2}.rpm",
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).el8.x86_64.rpm",
"target": "centos8-devel/zextras/{1}/{1}-{2}.el8.x86_64.rpm",
"props": "rpm.metadata.arch=x86_64;rpm.metadata.vendor=zextras"
},
{
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).rpm",
"target": "rhel9-devel/zextras/{1}/{1}-{2}.rpm",
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).el9.x86_64.rpm",
"target": "rhel9-devel/zextras/{1}/{1}-{2}.el9.x86_64.rpm",
"props": "rpm.metadata.arch=x86_64;rpm.metadata.vendor=zextras"
}
]
Expand All @@ -147,7 +166,8 @@ pipeline {
}
steps {
unstash 'artifacts-deb'
unstash 'artifacts-rpm'
unstash 'artifacts-rhel8'
unstash 'artifacts-rhel9'
script {
def server = Artifactory.server 'zextras-artifactory'
def buildInfo
Expand Down Expand Up @@ -187,8 +207,8 @@ pipeline {
uploadSpec= """{
"files": [
{
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).rpm",
"target": "centos8-rc/zextras/{1}/{1}-{2}.rpm",
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).el8.x86_64rpm",
"target": "centos8-rc/zextras/{1}/{1}-{2}.el8.x86_64.rpm",
"props": "rpm.metadata.arch=x86_64;rpm.metadata.vendor=zextras"
}
]
Expand All @@ -214,8 +234,8 @@ pipeline {
uploadSpec= """{
"files": [
{
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).rpm",
"target": "rhel9-rc/zextras/{1}/{1}-{2}.rpm",
"pattern": "artifacts/x86_64/(carbonio-appserver)-(*).el9.x86_64.rpm",
"target": "rhel9-rc/zextras/{1}/{1}-{2}.el9.x86_64.rpm",
"props": "rpm.metadata.arch=x86_64;rpm.metadata.vendor=zextras"
}
]
Expand Down
87 changes: 83 additions & 4 deletions appserver/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname="carbonio-appserver"
pkgver="4.1.2"
pkgver="4.1.3"
pkgrel="1"
pkgdesc="An open-source, community-driven email server"
maintainer="Zextras <[email protected]>"
Expand Down Expand Up @@ -36,7 +36,7 @@ source=(
sha256sums=(
'SKIP'
'SKIP'
'4723c403eb7d28d3158983999dd8adac8716870a63ff75e98744916f9efe64e4'
'c067736a3d918bc1ca4cf9139b64776628287ccf6bb34ba9c09053a1741c4c6d'
)

package() {
Expand Down Expand Up @@ -124,7 +124,7 @@ package() {

ln -sf "/lib/systemd/system/carbonio-configd.service" \
"${pkgdir}/lib/systemd/system/${pkgname}.target.wants/carbonio-configd.service"
ln -sf "/lib/systemd/system/carbonio-stats" \
ln -sf "/lib/systemd/system/carbonio-stats.service" \
"${pkgdir}/lib/systemd/system/${pkgname}.target.wants/carbonio-stats.service"
ln -sf "/lib/systemd/system/${pkgname}.service" \
"${pkgdir}/lib/systemd/system/${pkgname}.target.wants/${pkgname}.service"
Expand All @@ -142,7 +142,7 @@ preinst() {
fi
}

postinst() {
postinst__apt() {
H=$(hostname -s)

if [ -f /opt/zextras/db/db.sql ]; then
Expand Down Expand Up @@ -172,3 +172,82 @@ postinst() {
/opt/zextras/libexec/zmfixperms
fi
}

postinst__rocky_8() {
H=$(hostname -s)

if [ -f /opt/zextras/db/db.sql ]; then
mv /opt/zextras/db/db.sql /opt/zextras/db/db.sql.in
sed -e "/server.hostname/ s/local/$H/" /opt/zextras/db/db.sql.in >/opt/zextras/db/db.sql
chown zextras:zextras /opt/zextras/db/db.sql*
chmod 440 /opt/zextras/db/db.sql*
fi

(cd /opt/zextras && rm -f jetty && ln -s jetty_base jetty)
(cd /opt/zextras && rm -f mailboxd && ln -s jetty_base mailboxd)

mkdir -p /opt/zextras/mailboxd/logs
chown zextras:zextras /opt/zextras/mailboxd/logs

mkdir -p /opt/zextras/redolog
mkdir -p /opt/zextras/store
mkdir -p /opt/zextras/index
mkdir -p /opt/zextras/backup
chown zextras:zextras /opt/zextras/redolog /opt/zextras/store /opt/zextras/index /opt/zextras/backup

if [ -d "/opt/zextras/mailboxd/work/zimbra" ]; then
find /opt/zextras/mailboxd/work/zimbra -exec touch {} \; 2>/dev/null
fi

if [ -x "/opt/zextras/libexec/zmfixperms" ]; then
/opt/zextras/libexec/zmfixperms
fi
}

postinst__rocky_9() {
H=$(hostname -s)

if [ -f /opt/zextras/db/db.sql ]; then
mv /opt/zextras/db/db.sql /opt/zextras/db/db.sql.in
sed -e "/server.hostname/ s/local/$H/" /opt/zextras/db/db.sql.in >/opt/zextras/db/db.sql
chown zextras:zextras /opt/zextras/db/db.sql*
chmod 440 /opt/zextras/db/db.sql*
fi

(cd /opt/zextras && rm -f jetty && ln -s jetty_base jetty)
(cd /opt/zextras && rm -f mailboxd && ln -s jetty_base mailboxd)

mkdir -p /opt/zextras/mailboxd/logs
chown zextras:zextras /opt/zextras/mailboxd/logs

mkdir -p /opt/zextras/redolog
mkdir -p /opt/zextras/store
mkdir -p /opt/zextras/index
mkdir -p /opt/zextras/backup
chown zextras:zextras /opt/zextras/redolog /opt/zextras/store /opt/zextras/index /opt/zextras/backup

if [ -d "/opt/zextras/mailboxd/work/zimbra" ]; then
find /opt/zextras/mailboxd/work/zimbra -exec touch {} \; 2>/dev/null
fi

if [ -x "/opt/zextras/libexec/zmfixperms" ]; then
/opt/zextras/libexec/zmfixperms
fi

if [ -d /run/systemd/system ]; then
systemctl daemon-reload >/dev/null 2>&1 || :
systemctl enable carbonio-appserver.target >/dev/null 2>&1 || :
fi
}

prerm__rocky_9() {
if [ -d /run/systemd/system ]; then
systemctl --no-reload disable --now carbonio-appserver.target >/dev/null 2>&1 || :
fi
}

postrm__rocky_9() {
if [ -d /run/systemd/system ]; then
systemctl daemon-reload >/dev/null 2>&1 || :
fi
}
3 changes: 3 additions & 0 deletions appserver/carbonio-appserver.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Requires=multi-user.target
After=multi-user.target
PartOf=carbonio-ce.target carbonio.target
AllowIsolate=yes

[Install]
WantedBy=multi-user.target

0 comments on commit 9a7bf3f

Please sign in to comment.