1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from April
2024</title>
5 <description>Entries from April
2024</description>
6 <link>https://people.skolelinux.org/pere/blog/
</link>
10 <title>45 orphaned Debian packages moved to git,
391 to go
</title>
11 <link>https://people.skolelinux.org/pere/blog/
45_orphaned_Debian_packages_moved_to_git__391_to_go.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/
45_orphaned_Debian_packages_moved_to_git__391_to_go.html
</guid>
13 <pubDate>Thu,
25 Apr
2024 22:
00:
00 +
0200</pubDate>
14 <description><p
>Nine days ago, I started migrating orphaned Debian packages with no
15 version control system listed in debian/control of the source to git.
16 At the time there were
438 such packages. Now there are
391,
17 according to the UDD. In reality it is slightly less, as there is a
18 delay between uploads and UDD updates. In the nine days since, I have
19 thus been able to work my way through ten percent of the packages. I
20 am starting to run out of steam, and hope someone else will also help
21 brushing some dust of these packages. Here is a recipe how to do it.
23 I start by picking a random package by querying the UDD for a list of
24 10 random packages from the set of remaining packages:
26 <blockquote
><pre
>
27 PGPASSWORD=
"udd-mirror
" psql --port=
5432 --host=udd-mirror.debian.net \
28 --username=udd-mirror udd -c
"select source from sources \
29 where release =
'sid
' and (vcs_url ilike
'%anonscm.debian.org%
' \
30 OR vcs_browser ilike
'%anonscm.debian.org%
' or vcs_url IS NULL \
31 OR vcs_browser IS NULL) AND maintainer ilike
'%packages@qa.debian.org%
' \
32 order by random() limit
10;
"
33 </pre
></blockquote
>
35 <p
>Next, I visit http://salsa.debian.org/debian and search for the
36 package name, to ensure no git repository already exist. If it does,
37 I clone it and try to get it to an uploadable state, and add the Vcs-*
38 entries in d/control to make the repository more widely known. These
39 packages are a minority, so I will not cover that use case here.
</p
>
41 <p
>For packages without an existing git repository, I run the
42 following script
<tt
>debian-snap-to-salsa
</tt
> to prepare a git
43 repository with the existing packaging.
</p
>
45 <blockquote
><pre
>
48 # See also https://bugs.debian.org/
804722#
31
52 # Move to this Standards-Version.
57 if [ -z
"$PKG
" ]; then
58 echo
"usage: $
0 <pkgname
>"
62 if [ -e
"${PKG}-salsa
" ]; then
63 echo
"error: ${PKG}-salsa already exist, aborting.
"
67 if [ -z
"ALLOWFAILURE
" ] ; then
71 # Fetch every snapshotted source package. Manually loop until all
72 # transfers succeed, as
'gbp import-dscs --debsnap
' do not fail on
74 until debsnap --force -v $PKG || $ALLOWFAILURE ; do sleep
1; done
75 mkdir ${PKG}-salsa; cd ${PKG}-salsa
78 # Specify branches to override any debian/gbp.conf file present in the
80 gbp import-dscs --debian-branch=master --upstream-branch=upstream \
81 --pristine-tar ../source-$PKG/*.dsc
83 # Add Vcs pointing to Salsa Debian project (must be manually created
85 if ! grep -q ^Vcs- debian/control ; then
86 awk
"BEGIN { s=
1 } /^\$/ { if (s==
1) { print \
"Vcs-Browser: https://salsa.debian.org/debian/$PKG\
"; print \
"Vcs-Git: https://salsa.debian.org/debian/$PKG.git\
" }; s=
0 } { print }
" < debian/control
> debian/control.new
&& mv debian/control.new debian/control
87 git commit -m
"Updated vcs in d/control to Salsa.
" debian/control
90 # Tell gbp to enforce the use of pristine-tar.
91 inifile +inifile debian/gbp.conf +create +section DEFAULT +key pristine-tar +value True
92 git add debian/gbp.conf
93 git commit -m
"Added d/gbp.conf to enforce the use of pristine-tar.
" debian/gbp.conf
95 # Update to latest Standards-Version.
96 SV=
"$(grep ^Standards-Version: debian/control|awk
'{print $
2}
')
"
97 if [ $SV_LATEST != $SV ]; then
98 sed -i
"s/\(Standards-Version: \)\(.*\)/\
1$SV_LATEST/
" debian/control
99 git commit -m
"Updated Standards-Version from $SV to $SV_LATEST.
" debian/control
102 if grep -q pkg-config debian/control; then
103 sed -i s/pkg-config/pkgconf/ debian/control
104 git commit -m
"Replaced obsolete pkg-config build dependency with pkgconf.
" debian/control
107 if grep -q libncurses5-dev debian/control; then
108 sed -i s/libncurses5-dev/libncurses-dev/ debian/control
109 git commit -m
"Replaced obsolete libncurses5-dev build dependency with libncurses-dev.
" debian/control
111 </pre
></blockquote
>
113 Some times the debsnap script fail to download some of the versions.
114 In those cases I investigate, and if I decide the failing versions
115 will not be missed, I call it using ALLOWFAILURE=true to ignore the
116 problem and create the git repository anyway.
</p
>
118 <p
>With the git repository in place, I do a test build (gbp
119 buildpackage) to ensure the build is actually working. If it does not
120 I pick a different package, or if the build failure is trivial to fix,
121 I fix it before continuing. At this stage I revisit
122 http://salsa.debian.org/debian and create the project under this group
123 for the package. I then follow the instructions to publish the local
124 git repository. Here is from a recent example:
</p
>
126 <blockquote
><pre
>
127 git remote add origin git@salsa.debian.org:debian/perl-byacc.git
128 git push --set-upstream origin master upstream pristine-tar
130 </pre
></blockquote
>
132 <p
>With a working build, I have a look at the build rules if I want to
133 remove some more dust. I normally try to move to debhelper compat
134 level
13, which involves removing debian/compat and modifying
135 debian/control to build depend on debhelper-compat (=
13). I also test
136 with
'Rules-Requires-Root: no
' in debian/control and verify in
137 debian/rules that hardening is enabled, and include all of these if
138 the package still build. If it fail to build with level
13, I try
139 with
12,
11,
10 and so on until I find a level where it build, as I do
140 not want to spend a lot of time fixing build issues.
</p
>
142 <p
>Some times, when I feel inspired, I make sure debian/copyright is
143 converted to the machine readable format, often by starting with
144 'debhelper -cc
' and then cleaning up the autogenerated content until
145 it matches realities. If I feel like it, I might also clean up
146 non-dh-based debian/rules files to use the short style dh build
149 <p
>Once I have removed all the dust I care to process for the package,
150 I run
'gbp dch
' to generate a debian/changelog entry based on the
151 commits done so far, run
'dch -r
' to switch from
'UNRELEASED
' to
152 'unstable
' and get an editor to make sure the
'QA upload
' marker is in
153 place and that all long commit descriptions are wrapped into sensible
154 lengths, run
'debcommit --release -a
' to commit and tag the new
155 debian/changelog entry, run
'debuild -S
' to build a source only
156 package, and
'dput ../perl-byacc_2.0-
10_source.changes
' to do the
157 upload. During the entire process, and many times per step, I run
158 'debuild
' to verify the changes done still work. I also some times
159 verify the set of built files using
'find debian
' to see if I can spot
160 any problems (like no file in usr/bin any more or empty package). I
161 also try to fix all lintian issues reported at the end of each
162 'debuild
' run.
</p
>
164 <p
>If I find Debian specific patches, I try to ensure their metadata
165 is fairly up to date and some times I even try to reach out to
166 upstream, to make the upstream project aware of the patches. Most of
167 my emails bounce, so the success rate is low. For projects with no
168 Homepage entry in debian/control I try to track down one, and for
169 packages with no debian/watch file I try to create one. But at least
170 for some of the packages I have been unable to find a functioning
171 upstream, and must skip both of these.
</p
>
173 <p
>If I could handle ten percent in nine days, twenty people could
174 complete the rest in less then five days. I use approximately twenty
175 minutes per package, when I have twenty minutes spare time to spend.
176 Perhaps you got twenty minutes to spare too?
</p
>
178 <p
>As usual, if you use Bitcoin and want to show your support of my
179 activities, please send Bitcoin donations to my address
180 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
185 <title>RAID status from LSI Megaraid controllers in Debian
</title>
186 <link>https://people.skolelinux.org/pere/blog/RAID_status_from_LSI_Megaraid_controllers_in_Debian.html
</link>
187 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/RAID_status_from_LSI_Megaraid_controllers_in_Debian.html
</guid>
188 <pubDate>Wed,
17 Apr
2024 17:
00:
00 +
0200</pubDate>
189 <description><p
>I am happy to report that
190 <a href=
"https://github.com/namiltd/megactl
">the megactl package
</a
>,
191 useful to fetch RAID status when using the LSI Megaraid controller,
192 now is available in Debian. It passed NEW a few days ago, and is now
193 <a href=
"https://tracker.debian.org/pkg/megactl
">available in
194 unstable
</a
>, and probably showing up in testing in a weeks time. The
195 new version should provide Appstream hardware mapping and should
196 integrate nicely with isenkram.
</p
>
198 <p
>As usual, if you use Bitcoin and want to show your support of my
199 activities, please send Bitcoin donations to my address
200 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
206 <title>Time to move orphaned Debian packages to git
</title>
207 <link>https://people.skolelinux.org/pere/blog/Time_to_move_orphaned_Debian_packages_to_git.html
</link>
208 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Time_to_move_orphaned_Debian_packages_to_git.html
</guid>
209 <pubDate>Sun,
14 Apr
2024 09:
30:
00 +
0200</pubDate>
210 <description><p
>There are several packages in Debian without a associated git
211 repository with the packaging history. This is unfortunate and it
212 would be nice if more of these would do so. Quote a lot of these are
213 without a maintainer, ie listed as maintained by the
214 '<a href=
"https://qa.debian.org/developer.php?email=packages%
40qa.debian.org
">Debian
215 QA Group
</a
>' place holder. In fact,
438 packages have this property
216 according to UDD (
<tt
>SELECT source FROM sources WHERE release =
'sid
'
217 AND (vcs_url ilike
'%anonscm.debian.org%
' OR vcs_browser ilike
218 '%anonscm.debian.org%
' or vcs_url IS NULL OR vcs_browser IS NULL) AND
219 maintainer ilike
'%packages@qa.debian.org%
';
</tt
>). Such packages can
220 be updated without much coordination by any Debian developer, as they
221 are considered orphaned.
</p
>
223 <p
>To try to improve the situation and reduce the number of packages
224 without associated git repository, I started a few days ago to search
225 out candiates and provide them with a git repository under the
226 'debian
' collaborative Salsa project. I started with the packages
227 pointing to obsolete Alioth git repositories, and am now working my
228 way across the ones completely without git references. In addition to
229 updating the Vcs-* debian/control fields, I try to update
230 Standards-Version, debhelper compat level, simplify d/rules, switch to
231 Rules-Requires-Root: no and fix lintian issues reported. I only
232 implement those that are trivial to fix, to avoid spending too much
233 time on each orphaned package. So far my experience is that it take
234 aproximately
20 minutes to convert a package without any git
235 references, and a lot more for packages with existing git repositories
236 incompatible with git-buildpackages.
</p
>
238 <p
>So far I have converted
10 packages, and I will keep going until I
239 run out of steam. As should be clear from the numbers, there is
240 enough packages remaining for more people to do the same without
241 stepping on each others toes. I find it useful to start by searching
242 for a git repo already on salsa, as I find that some times a git repo
243 has already been created, but no new version is uploaded to Debian
244 yet. In those cases I start with the existing git repository. I
245 convert to the git-buildpackage+pristine-tar workflow, and ensure a
246 debian/gbp.conf file with
"pristine-tar=True
" is added early, to avoid
247 uploading a orig.tar.gz with the wrong checksum by mistake. Did that
248 three times in the begin before I remembered my mistake.
</p
>
250 <p
>So, if you are a Debian Developer and got some spare time, perhaps
251 considering migrating some orphaned packages to git?
</p
>
253 <p
>As usual, if you use Bitcoin and want to show your support of my
254 activities, please send Bitcoin donations to my address
255 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>