Skip to content

Commit

Permalink
remove workarounds for otel injection
Browse files Browse the repository at this point in the history
  • Loading branch information
plengauer committed Feb 15, 2024
1 parent 49ef34f commit 1007078
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: gitaptly
Version: 3.2.1
Version: 3.3.0
Architecture: all
Depends: debconf, bash, jq, cron, gzip, dpkg-dev, curl, wget, python3, python3-pip, python3-venv
Suggests: opentelemetry-shell (>= 1.0.0)
Expand Down
2 changes: 1 addition & 1 deletion package/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ "$MODE" = "cache" ]; then
elif [ "$MODE" = "proxy" ]; then
rm $(find /var/lib/gitaptly/pool/main/*/*/ -type f) || true
fi
bash /usr/bin/gitaptly_update.sh
gitaptly_update

systemctl daemon-reload
systemctl enable gitaptly
Expand Down
2 changes: 1 addition & 1 deletion package/etc/cron.d/gitaptly
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0 * * * * root gitaptly_update.sh
0 * * * * root gitaptly_update

2 changes: 1 addition & 1 deletion package/etc/systemd/system/gitaptly.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ RestartSec=1
StartLimitBurst=10
User=root
WorkingDirectory=/opt/gitaptly
ExecStart=/bin/bash /usr/bin/gitaptly_run_ftp.sh
ExecStart=gitaptly_run_ftp
[Install]
WantedBy=multi-user.target
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
set -e
source /opt/gitaptly/env
if [ -f /usr/bin/opentelemetry_shell.sh ]; then
Expand All @@ -18,4 +18,4 @@ fi
rm /var/lib/gitaptly/dists/stable/main/binary-all/Packages
rm -rf /var/lib/gitaptly/pool/main/*
rm -rf /var/lib/gitaptly/cgi-bin/main/*
bash /usr/bin/gitaptly_update.sh
gitaptly_update
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
set -e
source /opt/gitaptly/env
source /opt/gitaptly/bin/activate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
set -e

owner=$1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
set -e
source /opt/gitaptly/env
if [ -f /usr/bin/opentelemetry_shell.sh ]; then
Expand Down Expand Up @@ -34,4 +34,4 @@ fi

echo "Content-Type: application/vnd.debian.binary-package"
echo ""
wget -O - $(bash /usr/bin/gitaptly_scan.sh $owner $repo | (grep "$file"'$' || true) | head --lines=1)
wget -O - $(gitaptly_scan $owner $repo | (grep "$file"'$' || true) | head --lines=1)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if [ "$MODE" = 'cache' ]; then
owner=$(echo $line | cut -d "/" -f 1)
repo=$(echo $line | cut -d "/" -f 2)
mkdir -p pool/main/$owner/$repo
wget -nc -P pool/main/$owner/$repo $(bash /usr/bin/gitaptly_scan.sh $owner $repo) || true
wget -nc -P pool/main/$owner/$repo $(gitaptly_scan $owner $repo) || true
done < /etc/gitaptly.conf
dpkg-scanpackages --multiversion pool/ > dists/stable/main/binary-all/Packages

Expand All @@ -45,7 +45,7 @@ elif [ "$MODE" = 'proxy' ]; then
repo=$(echo $line | cut -d "/" -f 2)
mkdir -p pool/main/$owner/$repo
mkdir -p cgi-bin/main/$owner/$repo
for url in $(bash /usr/bin/gitaptly_scan.sh $owner $repo)
for url in $(gitaptly_scan $owner $repo)
do
file=$(echo $url | rev | cut -d "/" -f 1 | rev)
if [ -f cgi-bin/main/$owner/$repo/$file ]; then
Expand All @@ -54,7 +54,7 @@ elif [ "$MODE" = 'proxy' ]; then
wget -nc -O pool/main/$owner/$repo/$file $url
dpkg-scanpackages --multiversion pool/main/$owner/$repo/$file | sed "s/Filename: .*/Filename: cgi-bin\/main\/$owner\/$repo\/$file/" >> dists/stable/main/binary-all/Packages
rm pool/main/$owner/$repo/$file
ln --symbolic /usr/bin/gitaptly_serve.sh cgi-bin/main/$owner/$repo/$file
ln --symbolic /usr/bin/gitaptly_serve cgi-bin/main/$owner/$repo/$file
done
done < /etc/gitaptly.conf

Expand All @@ -63,4 +63,4 @@ else
fi

gzip -9 < dists/stable/main/binary-all/Packages > dists/stable/main/binary-all/Packages.gz
bash /usr/bin/gitaptly_create_release.sh dists/stable > dists/stable/Release
gitaptly_create_release dists/stable > dists/stable/Release

0 comments on commit 1007078

Please sign in to comment.