<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://terceiro.xyz/">
  <id>https://terceiro.xyz/</id>
  <title>Antonio Terceiro - Posts tagged with "debian"</title>
  <updated>2026-04-18T06:00:00Z</updated>
  <link rel="alternate" href="https://terceiro.xyz/" type="text/html"/>
  <link rel="self" href="https://terceiro.xyz/tag/debian/feed.xml" type="application/atom+xml"/>
  <author>
    <name>Antonio Terceiro</name>
    <uri>https://terceiro.xyz</uri>
  </author>
  <entry>
    <id>tag:terceiro.xyz,2026-04-18:/2026/04/18/debian-e-o-eca-digital/</id>
    <title type="html">Debian e o ECA Digital</title>
    <published>2026-04-18T06:00:00Z</published>
    <updated>2026-04-18T06:00:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2026/04/18/debian-e-o-eca-digital/" type="text/html"/>
    <content type="html">&lt;p&gt;A &lt;a href="https://www.planalto.gov.br/ccivil_03/_ato2023-2026/2025/Lei/L15211.htm"&gt;Lei Nº 15.211&lt;/a&gt;, de 17 de setembro de 2025, popularmente
conhecida como o &lt;strong&gt;ECA Digital&lt;/strong&gt; (em referência ao ECA - Estatuto de Criança e
do Adolescente, &lt;a href="https://www.planalto.gov.br/ccivil_03/leis/L8069.htm"&gt;lei Nº 8.069, de 13 de julho de 1990&lt;/a&gt;), foi promulgada
em março de 2026.
A não ser que você tenha estado numa caverna no último mês, você sabe que essa
lei declara o objetivo de "proteção de crianças e adolescentes em ambientes
digitais".&lt;/p&gt;

&lt;p&gt;Por um lado, é evidente que a distribuição de conteúdo em massa tem que ser
regulada de alguma forma pra evitar a instrumentalização das redes sociais pra
promover o vício em estar online, a divulgação de desinformação, incluindo pra
influenciar eleições e articular tentativas de golpes de estado, e outras
atividades que claramente criam problemas para a saúde pública e para a
economia popular (apostas?). Crianças e adolescentes são particularmente
suscetíveis a essa pororoca de chorume que é a internet comercial.&lt;/p&gt;

&lt;p&gt;Por outro lado, existem várias partes da lei que não são específicas o
suficiente, e que abrem brechas para tornar legais coisas que são
absolutamente execráveis, como a coleta de dados biométricos em massa a fim de
"proteger as criancinhas".&lt;/p&gt;

&lt;p&gt;Eu acho que muitos aspectos desse lei merecem debate, mas aqui eu vou focar
apenas na relação dessa nova legislação com o Debian e as suas consequências
concretas para o projeto, porque a lei 15.211 menciona explicitamente
"sistemas operacionais de terminal", que são sistemas operacionais destinados
ao acesso à internet por usuários finais.&lt;/p&gt;

&lt;p&gt;Problemas complexos possuem respostas fáceis que sempre estão erradas,
e eu não pretendo aqui trazer conclusões definitivas.&lt;/p&gt;

&lt;h2&gt;A reação ao ECA Digital&lt;/h2&gt;

&lt;p&gt;A iminência da promulgação levou a uma reação de pânico na internet.
Textos e mais textos foram escritos.
Só no Tecmundo, que segundo algumas fontes parece ser "o maior site sobre
tecnologia do Brasil", teve um &lt;a href="https://www.tecmundo.com.br/seguranca/411604-a-lei-felca-pode-bloquear-o-linux-no-brasil.htm"&gt;texto do Thiago Ayub&lt;/a&gt; que ao menos
na minha bolha pareceu ser o primeiro a viralizar sobre o tema, e aparentemente
deu o tom da reação da maioria da comunidade.&lt;/p&gt;

&lt;p&gt;Outra reação bastante negativa foi a do Alexandre Oliva, que vem
escrevendo uma &lt;a href="https://blog.lx.oliva.nom.br/tags/ECA-Digital.html"&gt;série de textos&lt;/a&gt; que aumenta cada vez que eu
consulto. O Oliva é uma referência no Software Livre e eu tenho máximo
respeito pelas reflexões dele. Ele questiona tudo que poderia dar errado, e
passa um depurador no texto da lei. Vai um pouco longe em alguns possíveis
casos que a lei poderia vir a se aplicar, eu acho, mas vale a leitura.&lt;/p&gt;

&lt;p&gt;Uma certa bolha no Youtube viu uma explosão de vídeos apocalípticos decretando
o fim do "Linux" no Brasil. Um vídeo razoável, de um canal que eu acompanho e
cujas reflexões eu respeito e com as quais eu quase sempre concordo, foi &lt;a href="https://www.youtube.com/watch?v=-g06texaASk"&gt;o do
Tecnologia e Classe&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Reflexões um pouco mais otimistas vêm do Paulo Rená, que tem publicado vários
&lt;a href="https://www.tecmundo.com.br/autor/paulo-rena"&gt;textos também no Tecmundo&lt;/a&gt; com uma visão mais positiva sobre a
lei em si e sobre as suas consequências para o software livre, e sobre como os
requisitos de aferição de idade &lt;em&gt;podem&lt;/em&gt; ser implementados da uma forma que não
contribua com um aumento da vigilância em massa.&lt;/p&gt;

&lt;h2&gt;O que de concreto nós (não) sabemos até agora&lt;/h2&gt;

&lt;p&gt;A lei foi sancionada em Março, e sua regulação foi delegada à &lt;a href="https://www.gov.br/anpd/pt-br"&gt;Agência
Nacional de Proteção de Dados (ANPD)&lt;/a&gt;, o que a princípio parece ser um
bom sinal. A ANPD &lt;a href="https://www.gov.br/anpd/pt-br/assuntos/eca-digital/eca-digital"&gt;divulgou um cronograma de ações&lt;/a&gt;
relacionadas à regulação, onde é dito que a partir de março de 2026,
"priorizará o monitoramento de lojas de aplicativos e sistemas operacionais
proprietários".&lt;/p&gt;

&lt;p&gt;Algo que me parece claro é que o a maior parte dos sistemas livres, usados
como infraestrutura, servidores, &lt;em&gt;desktops&lt;/em&gt; corporativos, estações de
trabalho etc, não são alcançados pela lei, porque não são "direcionado a crianças
e a adolescentes no País ou de acesso provável por eles". Também me parece
claro que o objetivo é regular os fornecedores &lt;strong&gt;comerciais&lt;/strong&gt; de hardware com
sistema operacional pré-instalado, e que pais e responsáveis que instalam um
sistema livre que eventualmente sejam usados por crianças ou adolescentes não
estão em risco.&lt;/p&gt;

&lt;p&gt;Por outro lado, empresas vão estar na mira, mais cedo ou mais tarde. A
Canonical, que nem vende hardware, &lt;a href="https://www.gov.br/anpd/pt-br/assuntos/noticias/em-acao-de-monitoramento-do-eca-digital-a-anpd-estende-o-prazo-para-que-empresas-prestem-informacoes-sobre-implementacao-das-novas-regras"&gt;está listada&lt;/a&gt; entre
as empresas às quais a ANPD solicitou informações sobre planos para adequação.
Fornecedores de hardware com software livre para consumidor
final certamente vão entrar no radar mais cedo ou mais tarde, assim como
empresas que eventualmente vendam hardware com software livre para escolas.
Não sei quantas dessas empresas existem, mas a gente com certeza quer que
existam mais delas, e não menos!&lt;/p&gt;

&lt;p&gt;Numa &lt;a href="https://www.youtube.com/watch?v=G6PeUp6yXtk"&gt;live organizada pela Safernet Brasil&lt;/a&gt;, mais de um dos
representantes do governo, incluindo o representante da ANPD, disseram
textualmente que não é o objetivo da lei prejudicar as comunidades de software
livre. Nesta mesma live, eu postei 4 perguntas que a princípio ficarem sem
resposta:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A nota inicial da ANPD menciona monitorar inicialmente "sistemas
operacionais proprietários", mas mais pra frente fala apenas de "sistemas
operacionais". Como exatamente ficam os sistemas operacionais livres?&lt;/li&gt;
&lt;li&gt;Num contexto de regulação de sistemas operacionais, é suficiente que um
sistema operacional forneça a possibilidade opcional de controle parental,
com indicação da idade configurada localmente no sistema pelo responsável
(administrador do sistema, i.e. "root"), e que responda apenas "sim" ou
"não" a perguntas do tipo "o usuário tem mais do que X anos de idade?", ou
apenas informe uma faixa etária para aplicações, sem nenhuma outra
informação pessoal?&lt;/li&gt;
&lt;li&gt;Projetos de sistema operacional livre, como o Debian, vão precisar ter
alguma forma de representação formal no Brasil pra lidar com eventual
monitoramento pela ANPD? O Debian não tem uma entidade formal central mesmo
a nível internacional!&lt;/li&gt;
&lt;li&gt;O grupo brasileiro de membros do Debian deveria procurar contratar uma
orientação legal agora, ou num futuro próximo?&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;A ANPD deve iniciar uma consulta pública (Tomada de Subsídios) ainda em Abril
sobre detalhes técnicos, o que até agora não aconteceu. A partir desse
momento, espero que consigamos ter um melhor entendidmento do quê
concretamente o projeto Debian precisa fazer, e também -- e principalmente --
o que o Debian &lt;strong&gt;não precisa&lt;/strong&gt; fazer.&lt;/p&gt;

&lt;h2&gt;O papel de um Sistema Operacional livre na proteção de crianças e adolescentes&lt;/h2&gt;

&lt;p&gt;O sistema operacional está numa posição privilegiada, tanto pra proteger,
quanto pra abusar do usuário. Um sistema operacional livre, mantido por uma
comunidade ativa e com os mecanismos de transparência já tradicionais, sob o
controle do dono do equipamento, deve ser capaz de proteger os usuários da
indústica de vigilância, e não fornecer mais do que o mínimo necessário pra
cumprir os objetivos da lei, que é a proteção de crianças e adolescentes:
apenas uma resposta sim/não pra uma pergunta sobre a idade do usuário, ou no
máximo informar a faixa de idade dele.&lt;/p&gt;

&lt;h2&gt;Problemas em aberto pra além do sistema operacional&lt;/h2&gt;

&lt;p&gt;Mesmo a maioria das pessoas que estão utilizando um sistema operacional livre
estão consumindo serviços proprietários e/ou centralizados do centro do
capitalismo, e esse é, na minha visão, um problema muito mais cabeludo do que
o que nós enquanto desenvolvedores de sistemas operacionais vamos ter que
lidar.&lt;/p&gt;

&lt;p&gt;Existem vários problemas em aberto para as camadas acima do sistema
operacional, e isso já começou a se manifestar com empresas querendo coletar
&lt;em&gt;selfies&lt;/em&gt;, documentos e etc. O ECA Digital não exige coleta de biometria, mas
também não proíbe definitivamente.&lt;/p&gt;

&lt;p&gt;Provas de conhecimento zero (&lt;em&gt;ZKP - Zero Knowledge Proofs&lt;/em&gt;) são uma
alternativa a ter que fornecer biometria ou outras formas de informações
pessoais a um número incomensurável de provedores de serviço, mas ainda assim,
exigem fornecer essas informações a pelo menos uma terceira parte que seja
confiável tanto pela sociedade quando para as empresas.&lt;/p&gt;

&lt;p&gt;No final das contas, o ideal seria que se o SO fornece uma atestação de idade
verificada localmente, isso fosee o suficiente e nenhuma informação pessoal a
mais fosse necessária. Mas o próprio texto da lei diz que as aplicações
precisam "implementar mecanismos próprios para impedir o acesso indevido de
crianças e de adolescentes a conteúdos inadequados para sua faixa etária",
independente do que o SO faça, o que pode abrir as portas pra reforçar ainda
mais o estado de vigilância em que estamos metidos.&lt;/p&gt;

&lt;h2&gt;Uma proposta de agenda para a comunidade de Software Livre&lt;/h2&gt;

&lt;p&gt;Sou pai de um adolescente que hoje tem 16 anos, e desde que ele tinha 13 eu
tive que prestar muita atenção no que ele fazia online. Teve bastante
conversa, mas qualquer adulto que já precisou convencer uma
adolescente de algo com o quê ele discorda a princípio sabe que existem
limites pra esse diálogo. Dessa forma, foi inevitável adotar soluções técnicas
pra um problema social, pra evitar tanto o excesso de uso, quanto o consumo de
conteúdo que não é adequado pra nenhum ser humano, muito menos pra
alguém cuja percepção do mundo ainda está em formação.&lt;/p&gt;

&lt;p&gt;Na minha opinião, o que sistemas operacionais livres como o Debian devem fazer
é fornecer uma ou mais soluções razoáveis de controle parental que sejam
capazes de indicar a idade ou faixa etária do usuário atual sem vazar nenhuma
outra informação e sem comunicar isso pra além da aplicação que está usando a
API disponível para isso. Eu gostaria de ter essa funcionalidade pra quando
minha sobrinha de 8 anos vier na minha casa e eu precisar emprestar um sistema
pra ela usar.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/debian-e-o-eca-digital/gnome-controles-parentais.png" alt="Controle parental no GNOME 49"&gt;&lt;/p&gt;

&lt;p&gt;Eu acredito que o controle parental do GNOME é um ótimo começo, e
aparentemente ele está ainda melhor no &lt;a href="https://release.gnome.org/50/"&gt;GNOME 50&lt;/a&gt;, que deve chegar
no Debian testing Logo™.&lt;/p&gt;

&lt;p&gt;Pra mim, os nossos próximos passos devem ser:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Incidir em todos os espaços possíveis pra garantir que o processo de
regulação pela ANPD explicite como exatamente projetos de software livre
serão tratados com relação ao ECA Digital. Por exemplo, se a ANPD não
pretende aplicar a lei a projetos de software livre, precisamos que isso
esteja &lt;strong&gt;formalizado por escrito&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Monitorar, e quando possível colaborar como o processo de implementação dos
mecanismos de aferição de idade pra que as soluções adotadas maximizem a
privacidade dos usuários, tanto na camada de sistema operacional quanto
para aplicações.&lt;/li&gt;
&lt;li&gt;Mostrar como é possível ter soluções livres e auditáveis das eventuais
ferramentas que serão necessárias. Por exemplo, pra mim seria fundamental
que existisse uma implementação de referência de um serviço de Provas de
conhecimento zero que seja empacotável no Debian e que não dependa de
instalar um caminhão de dependências de um lugar aleatório na internet e
que possa beneficiar seus usuários com o processo de atualizações de
segurança da comunidade de software livre.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Pro futuro, acho que o principal aprendizado é que não podemos deixar esse
tipo de regulação ser discutida à nossa revelia, e temos que estar preparados
pra participar mais ativamente do processo de discussão junto a organizações
que fazem esses debates. Nossa capacidade de interferir no processo
legislativo em si provavelmente vai ser limitada, mas vamos ter que dar um
jeito de depurar leis como essa antes delas serem aprovadas.&lt;/p&gt;

&lt;p&gt;No próximo sábado &lt;a href="https://campinas.mini.debconf.org/talks/53-todo-mundo-em-panico-debian-e-o-eca-digital/"&gt;estaremos discutindo este tema&lt;/a&gt; na
&lt;a href="https://campinas.mini.debconf.org/"&gt;MiniDebConf 2026&lt;/a&gt;, que vai acontecer entre 23 e 25 na UNICAMP.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2025-09-06:/2025/09/06/autopkgtest-support-in-debian-a-more-optimistic-view/</id>
    <title type="html">autopkgtest support in Debian: a more optimistic view</title>
    <published>2025-09-06T09:19:00Z</published>
    <updated>2025-09-06T09:19:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2025/09/06/autopkgtest-support-in-debian-a-more-optimistic-view/" type="text/html"/>
    <content type="html">&lt;p&gt;&lt;a href="../../05/past-halfway-there-history-of-autopkgtest-support-in-debian/"&gt;Yesterday I posted&lt;/a&gt;
about the history, in numbers, of the support for &lt;code&gt;autopkgtest&lt;/code&gt; in the Debian
archive. I had analyzed the presence of a &lt;code&gt;Testsuite:&lt;/code&gt; field in source
packages, from wheezy to trixie, and noticed a slowdown in the growth rate of
&lt;code&gt;autopkgtest&lt;/code&gt; support, in proportional terms. In each new release, the
percentage of packages declaring a test suite grew less than in the previous
release, for the last 4 releases.&lt;/p&gt;

&lt;p&gt;A night of sleep and a rainy morning later, I come back with a more optimistic
view, and present to you the following data, expanded from the raw data:&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt; Release year &lt;/th&gt;
&lt;th&gt; Release   &lt;/th&gt;
&lt;th&gt; Yes   &lt;/th&gt;
&lt;th&gt;  No    &lt;/th&gt;
&lt;th&gt; Total &lt;/th&gt;
&lt;th&gt; Δ Yes &lt;/th&gt;
&lt;th&gt; Δ No  &lt;/th&gt;
&lt;th&gt; Δ Total &lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt; 2013         &lt;/td&gt;
&lt;td&gt; wheezy    &lt;/td&gt;
&lt;td&gt; 5     &lt;/td&gt;
&lt;td&gt;  17170 &lt;/td&gt;
&lt;td&gt; 17175 &lt;/td&gt;
&lt;td&gt; --    &lt;/td&gt;
&lt;td&gt; --    &lt;/td&gt;
&lt;td&gt; --      &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; 2015         &lt;/td&gt;
&lt;td&gt; jessie    &lt;/td&gt;
&lt;td&gt; 1112  &lt;/td&gt;
&lt;td&gt;  19484 &lt;/td&gt;
&lt;td&gt; 20596 &lt;/td&gt;
&lt;td&gt; 1107  &lt;/td&gt;
&lt;td&gt; 2314  &lt;/td&gt;
&lt;td&gt; 3421    &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; 2017         &lt;/td&gt;
&lt;td&gt; stretch   &lt;/td&gt;
&lt;td&gt; 5110  &lt;/td&gt;
&lt;td&gt;  19735 &lt;/td&gt;
&lt;td&gt; 24845 &lt;/td&gt;
&lt;td&gt; 3998  &lt;/td&gt;
&lt;td&gt; 251   &lt;/td&gt;
&lt;td&gt; 4249    &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; 2019         &lt;/td&gt;
&lt;td&gt; buster    &lt;/td&gt;
&lt;td&gt; 9966  &lt;/td&gt;
&lt;td&gt;  18535 &lt;/td&gt;
&lt;td&gt; 28501 &lt;/td&gt;
&lt;td&gt; 4856  &lt;/td&gt;
&lt;td&gt; -1200 &lt;/td&gt;
&lt;td&gt; 3656    &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; 2021         &lt;/td&gt;
&lt;td&gt; bullseye  &lt;/td&gt;
&lt;td&gt; 13949 &lt;/td&gt;
&lt;td&gt;  16994 &lt;/td&gt;
&lt;td&gt; 30943 &lt;/td&gt;
&lt;td&gt; 3983  &lt;/td&gt;
&lt;td&gt; -1541 &lt;/td&gt;
&lt;td&gt; 2442    &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; 2023         &lt;/td&gt;
&lt;td&gt; bookworm  &lt;/td&gt;
&lt;td&gt; 17868 &lt;/td&gt;
&lt;td&gt;  16473 &lt;/td&gt;
&lt;td&gt; 34341 &lt;/td&gt;
&lt;td&gt; 3919  &lt;/td&gt;
&lt;td&gt; -521  &lt;/td&gt;
&lt;td&gt; 3398    &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; 2025         &lt;/td&gt;
&lt;td&gt; trixie    &lt;/td&gt;
&lt;td&gt; 21527 &lt;/td&gt;
&lt;td&gt;  16143 &lt;/td&gt;
&lt;td&gt; 37670 &lt;/td&gt;
&lt;td&gt; 3659  &lt;/td&gt;
&lt;td&gt; -330  &lt;/td&gt;
&lt;td&gt; 3329    &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;A few observations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since stretch, we have been consistently adding &lt;code&gt;autopkgtest&lt;/code&gt; support to
close to 4,000 packages on each release, on average.&lt;/li&gt;
&lt;li&gt;Since buster, the number of packages &lt;em&gt;without&lt;/em&gt; &lt;code&gt;autopkgtest&lt;/code&gt; support has
decreased in the hundreds.&lt;/li&gt;
&lt;li&gt;On average, each release has 3,400 packages more than the previous, while
also bringing 4,000 extra packages with &lt;code&gt;autopkgtest&lt;/code&gt; support. I have the
following hypotheses for this:

&lt;ol&gt;
&lt;li&gt;a large part of new packages are added already with &lt;code&gt;autopkgtest&lt;/code&gt;s;&lt;/li&gt;
&lt;li&gt;a smaller but reasonably large number of existing packages get
&lt;code&gt;autopkgtest&lt;/code&gt;s added on each release.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;All in all, I think this data show that Debian maintainers recognize the
usefulness of automated testing and are engaged in improving our QA process.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2025-09-05:/2025/09/05/past-halfway-there-history-of-autopkgtest-support-in-debian/</id>
    <title type="html">Past halfway there: history of autopkgtest support in Debian</title>
    <published>2025-09-05T20:22:00Z</published>
    <updated>2025-09-05T20:22:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2025/09/05/past-halfway-there-history-of-autopkgtest-support-in-debian/" type="text/html"/>
    <content type="html">&lt;p&gt;The Release of Debian 13 ("Trixie") last month marked another milestone on the
effort to provide automated test support for Debian packages in their installed
form. We have achieved the mark of 57% of the source packages in the archive
declaring support for &lt;code&gt;autopkgtest&lt;/code&gt;.&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt; &lt;strong&gt;Release&lt;/strong&gt; &lt;/th&gt;
&lt;th&gt; &lt;strong&gt;Packages with tests&lt;/strong&gt; &lt;/th&gt;
&lt;th&gt; &lt;strong&gt;Total number of packages&lt;/strong&gt; &lt;/th&gt;
&lt;th&gt; &lt;strong&gt;% of packages with tests&lt;/strong&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt; wheezy &lt;/td&gt;
&lt;td&gt; 5 &lt;/td&gt;
&lt;td&gt; 17175 &lt;/td&gt;
&lt;td&gt; 0% &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; jessie &lt;/td&gt;
&lt;td&gt; 1112 &lt;/td&gt;
&lt;td&gt; 20596 &lt;/td&gt;
&lt;td&gt; 5% &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; stretch &lt;/td&gt;
&lt;td&gt; 5110 &lt;/td&gt;
&lt;td&gt; 24845 &lt;/td&gt;
&lt;td&gt; 20% &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; buster &lt;/td&gt;
&lt;td&gt; 9966 &lt;/td&gt;
&lt;td&gt; 28501 &lt;/td&gt;
&lt;td&gt; 34% &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; bullseye &lt;/td&gt;
&lt;td&gt; 13949 &lt;/td&gt;
&lt;td&gt; 30943 &lt;/td&gt;
&lt;td&gt; 45% &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; bookworm &lt;/td&gt;
&lt;td&gt; 17868 &lt;/td&gt;
&lt;td&gt; 34341 &lt;/td&gt;
&lt;td&gt; 52% &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; trixie &lt;/td&gt;
&lt;td&gt; 21527 &lt;/td&gt;
&lt;td&gt; 37670 &lt;/td&gt;
&lt;td&gt; 57% &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;The code that generated this table is provided &lt;a href="#code"&gt;at the bottom&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The growth rate has been consistently decreasing at each release after stretch.
That probably means that the low hanging fruit -- adding support &lt;em&gt;en masse&lt;/em&gt; for
large numbers of similar packages, such as team-maintained packages for a given
programming language -- has been picked, and from now on the work gets slightly
harder. Perhaps there is a significant long tail of packages that will never
get &lt;code&gt;autopkgtest&lt;/code&gt; support.&lt;/p&gt;

&lt;p&gt;Looking for common prefixes among the packages missing a &lt;code&gt;Testsuite:&lt;/code&gt; field
gives me us the largest groups of packages missing &lt;code&gt;autopkgtest&lt;/code&gt; support:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ grep-dctrl -v -F Testsuite --regex -s Package -n . trixie | cut -d - -f 1 | uniq -c | sort -n| tail -20
     50 apertium
     50 kodi
     51 lomiri
     53 maven
     55 libjs
     57 globus
     66 cl
     67 pd
     72 lua
     79 php
     88 puppet
     91 r
    111 gnome
    124 ruby
    140 ocaml
    152 rust
    178 golang
    341 fonts
    557 python
   1072 haskell
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There seems to be a fair amount of Haskell and Python. If someone could figure
out a way of testing installed fonts in a meaningful way, this would a be a
good niche where we can cover 300+ packages.&lt;/p&gt;

&lt;p&gt;There is a another analysis that can be made, which I didn't: which percentage
of &lt;em&gt;new&lt;/em&gt; packages introduced in a given release have declared &lt;code&gt;autopkgtest&lt;/code&gt;
support, compared with the total of new packages in that release? My data only
counts the totals, so we start with the technical debt of the almost all of the
17,000 packages with no tests in wheezy, which was the &lt;em&gt;stable&lt;/em&gt; at the time I
started &lt;a href="https://ci.debian.net/"&gt;Debian CI&lt;/a&gt;. How many of those got tests since
then?&lt;/p&gt;

&lt;p&gt;Note that not supporting &lt;code&gt;autopkgtest&lt;/code&gt; does not mean that a package is not
tested at all: it can run build-time tests, which are also useful. Not
supporting &lt;code&gt;autopkgtest&lt;/code&gt;, though, means that their binaries in the archive
can't be automatically tested in their installed, but then there is a entire
horde of volunteers running &lt;em&gt;testing&lt;/em&gt; and &lt;em&gt;unstable&lt;/em&gt; on a daily basis who test
Debian and report bugs.&lt;/p&gt;

&lt;p&gt;&lt;a name="code"&gt;&lt;/a&gt;
This is the script that produced the table in the beginning of this post:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-eu&lt;/span&gt;

extract&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;local &lt;/span&gt;release
  &lt;span class="nb"&gt;local &lt;/span&gt;url
  &lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.gz"&lt;/span&gt;
    curl &lt;span class="nt"&gt;--silent&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;.gz &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;gunzip&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.gz"&lt;/span&gt;
  &lt;span class="k"&gt;fi

  &lt;/span&gt;&lt;span class="nb"&gt;local &lt;/span&gt;with_tests
  &lt;span class="nb"&gt;local &lt;/span&gt;total
  &lt;span class="nv"&gt;with_tests&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;grep-dctrl &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt; Testsuite &lt;span class="nt"&gt;--regex&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$release&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="nv"&gt;total&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;grep-dctrl &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt; Package &lt;span class="nt"&gt;--regex&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$release&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"| &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; | &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;with_tests&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; | &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;total&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; | &lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;with_tests/total&lt;span class="k"&gt;))&lt;/span&gt;&lt;span class="s2"&gt;% |"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"| **Release** | **Packages with tests** | **Total number of packages** | **% of packages with tests** |"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"|-------------|-------------------------|------------------------------|------------------------------|"&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;release &lt;span class="k"&gt;in &lt;/span&gt;wheezy jessie stretch buster&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;extract &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"http://archive.debian.org/debian/dists/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/main/source/Sources.gz"&lt;/span&gt;
&lt;span class="k"&gt;done
for &lt;/span&gt;release &lt;span class="k"&gt;in &lt;/span&gt;bullseye bookworm trixie&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;extract &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"http://ftp.br.debian.org/debian/dists/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;release&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/main/source/Sources.gz"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2024-09-08:/2024/09/08/gotcha-using-ccache-in-debian-package-builds/</id>
    <title type="html">gotcha: using ccache in Debian package builds</title>
    <published>2024-09-08T12:18:00Z</published>
    <updated>2024-09-08T12:18:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2024/09/08/gotcha-using-ccache-in-debian-package-builds/" type="text/html"/>
    <content type="html">&lt;p&gt;Before I upload packages to Debian, I always do a full build from source under
&lt;a href="https://packages.debian.org/sid/sbuild"&gt;sbuild&lt;/a&gt;. This ensures that the package
can build from source on a clean environment, implying that the set of build
dependencies is complete.&lt;/p&gt;

&lt;p&gt;But when iterating on a non-trivial package locally, I will usually build the
package directly on my Debian testing system, and I want to take advantage of
&lt;a href="https://ccache.dev/"&gt;ccache&lt;/a&gt; to cache native (C/C++) code compilation to speed
things up. In Debian, the easiest way to enable &lt;code&gt;ccache&lt;/code&gt; is to add
&lt;code&gt;/usr/lib/ccache&lt;/code&gt; to your &lt;code&gt;$PATH&lt;/code&gt;. I do this by doing something similar to the
following in my &lt;code&gt;~/.bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/lib/ccache:&lt;span class="nv"&gt;$PATH&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I noticed, however, that my Debian package builds were not using the cache.
When building the same small package manually using make, the cache was used,
but not when the build was wrapped with &lt;code&gt;dpkg-buildpackage&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I tracked it down to the fact that in compatibility level 13+, &lt;code&gt;debhelper&lt;/code&gt; will
set &lt;code&gt;$HOME&lt;/code&gt; to a temporary directory. For what's it worth, I think that's a
good thing: you don't want package builds reaching for your home directory as
that makes it harder to make builds reproducible, among other things.&lt;/p&gt;

&lt;p&gt;This behavior, however, breaks &lt;code&gt;ccache&lt;/code&gt;. The default cache directory is
&lt;code&gt;$HOME/.ccache&lt;/code&gt;, but that only gets resolved when &lt;code&gt;ccache&lt;/code&gt; is actually used. So
we end up starting with an empty cache on each build, get a 100% cache miss
rate, and still pay for the overhead of populating the cache.&lt;/p&gt;

&lt;p&gt;The fix is to explicitly set &lt;code&gt;$CCACHE_DIR&lt;/code&gt; upfront, so that by the time &lt;code&gt;$HOME&lt;/code&gt;
gets overriden, it doesn't matter anymore for &lt;code&gt;ccache&lt;/code&gt;. I did this in my
&lt;code&gt;~/.bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CCACHE_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/.ccache&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This way, &lt;code&gt;$HOME&lt;/code&gt; will be expanded right there when the shell starts, and by
the time &lt;code&gt;ccache&lt;/code&gt; is called, it will use the persistent cache in my home
directory even though &lt;code&gt;$HOME&lt;/code&gt; will, at that point, refer to a temporary
directory.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2023-12-28:/2023/12/28/debian-ci-10-years-later/</id>
    <title type="html">Debian CI: 10 years later</title>
    <published>2023-12-28T15:00:00Z</published>
    <updated>2023-12-28T15:00:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2023/12/28/debian-ci-10-years-later/" type="text/html"/>
    <content type="html">&lt;p&gt;It was 2013, and I was on a break from work between Christmas and New Year of
2013. I had been working at &lt;a href="https://www.linaro.org/"&gt;Linaro&lt;/a&gt; for well over a year, on the &lt;a href="https://www.lavasoftware.org/"&gt;LAVA
project&lt;/a&gt;. I was living and breathing automated testing infrastructure,
mostly for testing low-level components such as kernels and bootloaders, on
real hardware.&lt;/p&gt;

&lt;p&gt;At this point I was also a Debian contributor for quite some years, and had
become an official project members two years prior. Most of my involvement was
in the Ruby team, where we were already consistently running upstream test
suites during package builds.&lt;/p&gt;

&lt;p&gt;During that break, I put these two contexts together, and came to the
conclusion that Debian needed a dedicated service that would test the contents
of the Debian archive. I was aware of the existance of
&lt;a href="https://packages.debian.org/sid/autopkgtest"&gt;autopkgtest&lt;/a&gt;, and started working on a very simple service that
would later become &lt;a href="https://ci.debian.net/"&gt;Debian CI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In January 2014, &lt;code&gt;debci&lt;/code&gt; was initially announced on that month's &lt;a href="https://lists.debian.org/debian-devel-announce/2014/01/msg00007.html"&gt;Misc
Developer News&lt;/a&gt;, and later &lt;a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736416"&gt;uploaded to Debian&lt;/a&gt;. It's been
continuously developed for the last 10 years, evolved from a single shell
script running tests in a loop into a distributed system with 47
geographically-distributed machines as of writing this piece, became part of
the official Debian release process gating migrations to testing, had 5 Summer
of Code and Outrechy interns working on it, and processed beyond 40 million
test runs.&lt;/p&gt;

&lt;p&gt;In there years, Debian CI has received contributions from a lot of people, but
I would like to give special credits to the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ian Jackson - created autopkgtest.&lt;/li&gt;
&lt;li&gt;Martin Pitt - was the maintainer of autopkgtest when Debian CI launched and
helped a lot for some time.&lt;/li&gt;
&lt;li&gt;Paul Gevers - decided that he wanted Debian CI test runs to control testing
migration. While at it, became a member of the Debian Release Team and the
other half of the permanent Debian CI team together with me.&lt;/li&gt;
&lt;li&gt;Lucas Kanashiro - Google Summer of Code intern, 2014.&lt;/li&gt;
&lt;li&gt;Brandon Fairchild - Google Summer of Code intern, 2014.&lt;/li&gt;
&lt;li&gt;Candy Tsai - Outreachy intern, 2019.&lt;/li&gt;
&lt;li&gt;Pavit Kaur - Google Summer of Code intern, 2021&lt;/li&gt;
&lt;li&gt;Abiola Ajadi - Outreachy intern, December 2021-2022.&lt;/li&gt;
&lt;/ul&gt;

</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2021-10-12:/2021/10/12/triaging-debian-build-failure-logs-with-collab-qa-tools/</id>
    <title type="html">Triaging Debian build failure logs with collab-qa-tools</title>
    <published>2021-10-12T08:30:00Z</published>
    <updated>2021-10-12T08:30:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2021/10/12/triaging-debian-build-failure-logs-with-collab-qa-tools/" type="text/html"/>
    <content type="html">&lt;p&gt;The Ruby team is working now on transitioning to ruby 3.0. Even though most
packages will work just fine, there is substantial amount of packages that
require some work to adapt. We have been doing test rebuilds for a while during
transitions, but usually triaged the problems manually.&lt;/p&gt;

&lt;p&gt;This time I decided to try
&lt;a href="https://salsa.debian.org/lucas/collab-qa-tools"&gt;collab-qa-tools&lt;/a&gt;, a set of
scripts Lucas Nussbaum uses when he does archive-wide rebuilds. I'm really glad
that I did, because those tols save a lot of time when processing a large
number of build failures. In this post, I will go through how to triage a set
of build logs using collab-qa-tools.&lt;/p&gt;

&lt;p&gt;I have
&lt;a href="https://salsa.debian.org/lucas/collab-qa-tools/-/merge_requests/13"&gt;made&lt;/a&gt;
&lt;a href="https://salsa.debian.org/lucas/collab-qa-tools/-/merge_requests/14"&gt;some&lt;/a&gt;
&lt;a href="https://salsa.debian.org/lucas/collab-qa-tools/-/merge_requests/15"&gt;improvements&lt;/a&gt;
to the code. Given my last merge request is very new and was not merged yet,
a few of the things I mention here may apply only to
&lt;a href="https://salsa.debian.org/terceiro/collab-qa-tools/-/tree/ruby3.0"&gt;my own &lt;code&gt;ruby3.0&lt;/code&gt; branch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;collab-qa-tools also contains a few tools do perform the builds in the
cloud, but since we already had the builds done, I will not be mentioning that
part and will write exclusively about the triaging tools.&lt;/p&gt;

&lt;h2&gt;Installing collab-qa-tools&lt;/h2&gt;

&lt;p&gt;The first step is to clone the git repository.  Make sure you have the
dependencies from &lt;code&gt;debian/control&lt;/code&gt; installed (a few Ruby libraries).&lt;/p&gt;

&lt;p&gt;One of the patches I sent, and was already accepted, is the ability to run it
without the need to install:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;source /path/to/collab-qa-tools/activate.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will add the tools to your $PATH.&lt;/p&gt;

&lt;h2&gt;Preparation&lt;/h2&gt;

&lt;p&gt;The first think you need to do is getting all your build logs in a directory.
The tools assume &lt;code&gt;.log&lt;/code&gt; file extension, and they can be named
&lt;code&gt;${PACKAGE}_*.log&lt;/code&gt; or just &lt;code&gt;${PACKAGE}.log&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;Creating a TODO file&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;cqa-scanlogs | grep -v OK  | sed -e 's/$/ -- TODO/' &amp;gt; todo
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;todo&lt;/code&gt; will contain one line for each log with a summary of the failure, if
it's able to find one. collab-qa-tools has a large set of regular expressions
for finding errors in the build logs&lt;/p&gt;

&lt;p&gt;It's a good idea to split the TODO file in multiple ones. This can easily be
done with &lt;code&gt;split(1)&lt;/code&gt;, and can be used to delimit triaging sessions, and/or to
split the triaging between multiple people. For example this will create
&lt;code&gt;todo&lt;/code&gt; into &lt;code&gt;todo00&lt;/code&gt;, &lt;code&gt;todo01&lt;/code&gt;, ..., each containing 30 lines:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;split --lines=30 --numeric-suffixes todo todo
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Triaging&lt;/h2&gt;

&lt;p&gt;You can now do the triaging. Let's say we split the TODO files, and will start
with &lt;code&gt;todo01&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The first step is calling &lt;code&gt;cqa-fetchbugs&lt;/code&gt; (it does what it says on the tin):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cqa-fetchbugs --TODO=todo01
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, &lt;code&gt;cqa-annotate&lt;/code&gt; will guide you through the logs and allow you to report
bugs:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cqa-annotate --TODO=todo01
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I wrote myself a &lt;code&gt;process.sh&lt;/code&gt; wrapper script for &lt;code&gt;cqa-fetchbugs&lt;/code&gt; and
&lt;code&gt;cqa-annotate&lt;/code&gt; that looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-eu&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;todo &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c"&gt;# force downloading bugs&lt;/span&gt;
  &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print(".bugs." $1)}'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;todo&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | xargs &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt;
  cqa-fetchbugs &lt;span class="nt"&gt;--TODO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;todo&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

  cqa-annotate &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;template.txt.jinja2 &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--TODO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;todo&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;--template&lt;/code&gt; option is a recent contribution of mine. This is a template
for the bug reports you will be sending. It uses
&lt;a href="https://github.com/Shopify/liquid/wiki/Liquid-for-Designers"&gt;Liquid templates&lt;/a&gt;,
which is very similar to Jinja2 for Python. You will notice that I am even
pretending it &lt;em&gt;is&lt;/em&gt; Jinja2 to trick vim into doing syntax highlighting
for me. The template I'm using looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-jinja"&gt;From: &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;fullname&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;email&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
To: submit@bugs.debian.org
Subject: &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;package&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;: FTBFS with ruby3.0: &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;summary&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;

Source: &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;package&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;
Version: &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;version&lt;/span&gt; &lt;span class="o"&gt;| &lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="s1"&gt;'+rebuild'&lt;/span&gt; &lt;span class="o"&gt;| &lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: debian-ruby@lists.debian.org
Usertags: ruby3.0

Hi,

We are about to enable building against ruby3.0 on unstable. During a test
rebuild, &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;package&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt; was found to fail to build in that situation.

To reproduce this locally, you need to install ruby-all-dev from experimental
on an unstable system or build chroot.

Relevant part (hopefully):
&lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;extract&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;&amp;gt; &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;line&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;endfor&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;

The full build log is available at
https://people.debian.org/~kanashiro/ruby3.0/round2/builds/3/&lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;package&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;/&lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;| &lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;".log"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;".build.txt"&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;The cqa-annotate loop&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cqa-annotate&lt;/code&gt; will parse each log file, display an extract of what it found as
possibly being the relevant part, and wait for your input:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;######## ruby-cocaine_0.5.8-1.1+rebuild1633376733_amd64.log ########
--------- Error:
     Failure/Error: undef_method :exitstatus

     FrozenError:
       can't modify frozen object: pid 2351759 exit 0
     # ./spec/support/unsetting_exitstatus.rb:4:in `undef_method'
     # ./spec/support/unsetting_exitstatus.rb:4:in `singleton class'
     # ./spec/support/unsetting_exitstatus.rb:3:in `assuming_no_processes_have_been_run'
     # ./spec/cocaine/errors_spec.rb:55:in `block (2 levels) in &amp;lt;top (required)&amp;gt;'

Deprecation Warnings:

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /&amp;lt;&amp;lt;PKGBUILDDIR&amp;gt;&amp;gt;/spec/cocaine/command_line/runners/backticks_runner_spec.rb:19:in `block (2 levels) in &amp;lt;top (required)&amp;gt;'.


If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

1 deprecation warning total

Finished in 6.87 seconds (files took 2.68 seconds to load)
67 examples, 1 failure

Failed examples:

rspec ./spec/cocaine/errors_spec.rb:54 # When an error happens does not blow up if running the command errored before execution

/usr/bin/ruby3.0 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
ERROR: Test "ruby3.0" failed:
----------------
ERROR: Test "ruby3.0" failed:      Failure/Error: undef_method :exitstatus
----------------
package: ruby-cocaine
lines: 30
------------------------------------------------------------------------
s: skip
i: ignore this package permanently
r: report new bug
f: view full log
------------------------------------------------------------------------
Action [s|i|r|f]:
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can then choose one of the options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;s&lt;/code&gt; - skip this package and do nothing. You can run &lt;code&gt;cqa-annotate&lt;/code&gt; again
later and come back to it.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;i&lt;/code&gt; - ignore this package completely. New runs of &lt;code&gt;cqa-annotate&lt;/code&gt; won't ask
about it again.&lt;/p&gt;

&lt;p&gt;This is useful if the package only fails in your rebuilds due to another
package, and would just work when that other package gets fixes. In the Ruby
transition this happens when A depends on B, while B builds a C extension and
failed to build against the new Ruby. So once B is fixed, A should
just work (in principle). But even if A would even have problems of its own,
we can't really know before B is fixed so we can retry A.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;r&lt;/code&gt; - report a bug. &lt;code&gt;cqa-annotate&lt;/code&gt; will expand the template with the data
from the current log, and feed it to mutt. This is currently a limitation:
you have to use mutt to report bugs.&lt;/p&gt;

&lt;p&gt;After you report the bug, &lt;code&gt;cqa-annotate&lt;/code&gt; will ask if it should edit the TODO
file. In my opinion it's best to not do this, and annotate the package with a
bug number when you have one (see below).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;f&lt;/code&gt; - view the full log. This is useful when the extract displayed doesn't
have enough info, or you want to inspect something that happened earlier (or
later) during the build.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When there are existing bugs in the package, &lt;code&gt;cqa-annotate&lt;/code&gt; will list them
among the options. If you choose a bug number, the TODO file will be annotated
with that bug number and new runs of &lt;code&gt;cqa-annotate&lt;/code&gt; will not ask about that
package anymore. For example after I reported a bug for &lt;code&gt;ruby-cocaine&lt;/code&gt; for the
issue listed above, I aborted with a &lt;code&gt;ctrl-c&lt;/code&gt;, and when I run my &lt;code&gt;process.sh&lt;/code&gt;
script again I then get this prompt:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;----------------
ERROR: Test "ruby3.0" failed:      Failure/Error: undef_method :exitstatus
----------------
package: ruby-cocaine
lines: 30
------------------------------------------------------------------------
s: skip
i: ignore this package permanently
1: 996206 serious ruby-cocaine: FTBFS with ruby3.0: ERROR: Test "ruby3.0" failed:      Failure/Error: undef_method :exitstatus ||
r: report new bug
f: view full log
------------------------------------------------------------------------
Action [s|i|1|r|f]:
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Chosing &lt;code&gt;1&lt;/code&gt; will annotate the TODO file with the bug number, and I'm done with
this package. Only a few other hundreds to go.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2021-07-19:/2021/07/19/getting-help-with-autopkgtest-for-your-package/</id>
    <title type="html">Getting help with autopkgtest for your package</title>
    <published>2021-07-19T21:00:00Z</published>
    <updated>2021-07-19T21:00:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2021/07/19/getting-help-with-autopkgtest-for-your-package/" type="text/html"/>
    <content type="html">&lt;p&gt;If you have been involved in Debian packaging at all in the last few years, you
are probably aware that autopkgtest is now an important piece of the Debian
release process. Back in 2018, the automated testing migration process started
&lt;a href="https://lists.debian.org/msgid-search/4cb42bdc-ea03-57ca-1623-435d562f05ff@debian.org"&gt;considering autopkgtest test results&lt;/a&gt; as part of its decision
making.&lt;/p&gt;

&lt;p&gt;Since them, this process has received several improvements. For example, during
the &lt;a href="https://lists.debian.org/msgid-search/a3ce6189-5306-9019-d978-dba4419d1520@debian.org"&gt;bullseye freeze&lt;/a&gt;, non-key packages with a non-trivial
autopkgtest test suite could migrate automatically to testing without their
maintainers needing to open unblock requests, provided there was no regression
in theirs autopkgtest (or those from their reverse dependencies).&lt;/p&gt;

&lt;p&gt;&lt;a href="/2014/06/01/an-introduction-to-the-debian-continuous-integration-project/"&gt;Since 2014 when ci.debian.net was first introduced&lt;/a&gt;, we have seen an
amazing increase in the number of packages in Debian that can be automatically
tested. We went from around 100 to 15,000 today. This means not only happier
maintainers because their packages get to testing faster, but also &lt;strong&gt;improved
quality assurance for Debian as a whole&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="/images/ci-stats-2021.png" title="Packages tested by ci.debian.net on amd64" alt="Chart showing the number of packages tested by ci.debian.net. Starts from close to 0 in 2014, up to 15,000 in 2021. The growth tendency seems to slow down in the last year"&gt;&lt;/p&gt;

&lt;p&gt;However, the growth rate seems to be decreasing. Maybe the low hanging fruit
have all been picked, or maybe we just need to help more people jump in the
automated testing bandwagon.&lt;/p&gt;

&lt;p&gt;With that said, we would like to encourage and help more maintainers to add
autopkgtest to their packages. To that effect, I just created the
&lt;a href="https://salsa.debian.org/ci-team/autopkgtest-help/"&gt;autopkgtest-help repository on salsa&lt;/a&gt;, where we will take
help requests from maintainers working on autopkgtest for their packages.&lt;/p&gt;

&lt;p&gt;If you want help, please go ahead and &lt;a href="https://salsa.debian.org/ci-team/autopkgtest-help/-/issues/new"&gt;create an issue in there&lt;/a&gt;.
To quote the repository README:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Valid requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;"I want to add autopkgtest to package X. X is a tool that [...]  and it works
by [...]. How should I approach testing it?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It's OK if you have no idea where to start. But at least try to describe your
package, what it does and how it works so we can try to help you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;"I started writing autopkgtest for X, here is my current work in progress
[link]. But I encountered problem Y. How to I move forward?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you already have an autopkgtest but is having trouble making it work as
you think it should, you can also ask here.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Invalid requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;"Please write autopkgtest for my package X for me"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As with anything else in free software, please show appreciation for other
people's time, and do your own research first. If you pose your question with
enough details (see above) and make it interesting, it &lt;em&gt;may&lt;/em&gt; be that whoever
answers will write at least a basic structure for you, but as the maintainer
you are still the expert in the package and what tests are relevant.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you ask your question soon, you might get your answer recorded in video: we
are going to have a &lt;a href="https://debconf21.debconf.org/talks/1-autopkgtest-office-hours/"&gt;DebConf21 talk&lt;/a&gt; next month, where we I and
Paul Gevers (elbrus) will answer a few autopkgtest questions in video for
posterity.&lt;/p&gt;

&lt;p&gt;Now, if you have experience enabling autopkgtest for you own packages, please
consider watching that repository there to help us help our fellow maintainers.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2021-06-27:/2021/06/27/debian-continuous-integration-now-using-salsa-logins/</id>
    <title type="html">Debian Continuous Integration now using Salsa logins</title>
    <published>2021-06-27T13:00:00Z</published>
    <updated>2021-06-27T13:00:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2021/06/27/debian-continuous-integration-now-using-salsa-logins/" type="text/html"/>
    <content type="html">&lt;p&gt;I have just updated the &lt;a href="https://ci.debian.net"&gt;Debian Continuous Integration
platform&lt;/a&gt; with &lt;a href="https://tracker.debian.org/news/1243579/accepted-debci-31-source-into-experimental/"&gt;debci 3.1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This update brings a few database performance improvements, courtesy of adding
indexes to very important columns that were missing them. And boy, querying a
table with 13 million rows without the proper indexes is bad! :-)&lt;/p&gt;

&lt;p&gt;Now, the most user visible change in this update is the change from Debian SSO
to Salsa Logins, which is part of &lt;a href="https://pavitkaur05.github.io/"&gt;Pavit Kaur&lt;/a&gt;'s GSoC work. She has been
working with me and Paul Gevers for a few weeks, and this was the first
official task in the internship.&lt;/p&gt;

&lt;p&gt;For users, this means that you now can only log in via Salsa. If you have an
existing session where you logged in with an SSO certificate, it will still be
valid. When you log in with Salsa, your username will be changed to match the
one in Salsa. This means that if your account on salsa gets renamed, it will
automatically be renamed on Debian CI when you log in the next time.
Unfortunately we don't have a logout feature yet, but in the meantime you can
use the developer toolbar to delete any existing cookies you might have for
&lt;code&gt;ci.debian.net&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Migrating to Salsa logins was in my TODO list for a while. I had the impression
that it could do it pretty quick to do by using pre-existing libraries that
provide gitlab authentication integration for Rack (Ruby's de facto standard web
application interface, like uwsgi for Python). But in reality, the devil was in
the details.&lt;/p&gt;

&lt;p&gt;We went through &lt;a href="https://salsa.debian.org/ci-team/debci/-/merge_requests/179"&gt;several rounds of reviews&lt;/a&gt; to get it right. During
the entire process, Pavit demonstrated an excelent capacity for responding to
feedback, and overall I'm very happy with her performance in the internship so
far.&lt;/p&gt;

&lt;p&gt;While we were discussing the Salsa logins, we noted a limitation in the existing
database structure, where we stored usernames directly as the test &lt;code&gt;requestor&lt;/code&gt;
field, and decided it was better to normalize that relationship with a proper
foreign key to the users table, which she &lt;a href="https://salsa.debian.org/ci-team/debci/-/merge_requests/181"&gt;also worked on&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This update also include the very first (and non-user visible) step of her next
task, which is adding support for having private tests. Those will be useful
for implementing testing for embargoed security updates, and other use cases.
This was broken up into 7 or 8 seperate steps, so there is still some
work to do there. I'm looking forward to the continuation of this work.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2017-10-09:/2017/10/09/pristine-tar-updates/</id>
    <title type="html">pristine-tar updates</title>
    <published>2017-10-09T15:06:00Z</published>
    <updated>2017-10-09T15:06:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2017/10/09/pristine-tar-updates/" type="text/html"/>
    <content type="html">&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://packages.debian.org/pristine-tar"&gt;pristine-tar&lt;/a&gt; is a tool that is present in the workflow of a lot of Debian people. I adopted it last year after it has been orphaned by its creator &lt;a href="https://joeyh.name/"&gt;Joey Hess&lt;/a&gt;. A little after that &lt;a href="https://tomasz.buchert.pl/"&gt;Tomasz Buchert&lt;/a&gt; joined me and we are now a functional two-person team.&lt;/p&gt;

&lt;p&gt;pristine-tar goals are to import the content of a pristine upstream tarball into a VCS repository, and being able to later reconstruct that exact same tarball, bit by bit, based on the contents in the VCS, so we don’t have to store a full copy of that tarball. This is done by storing a binary delta files which can be used to reconstruct the original tarball from a tarball produced with the contents of the VCS. Ultimately, we want to make sure that the tarball that is uploaded to Debian is exactly the same as the one that has been downloaded from upstream, without having to keep a full copy of it around if all of its contents is already extracted in the VCS anyway.&lt;/p&gt;

&lt;h2&gt;The current state of the art, and perspectives for the future&lt;/h2&gt;

&lt;p&gt;pristine-tar solves a &lt;a href="https://en.wikipedia.org/wiki/Wicked_problem"&gt;wicked problem&lt;/a&gt;, because our ability to reconstruct the original tarball is affected by changes in the behavior of &lt;code&gt;tar&lt;/code&gt; and of all of the compression tools (&lt;code&gt;gzip&lt;/code&gt;, &lt;code&gt;bzip2&lt;/code&gt;, &lt;code&gt;xz&lt;/code&gt;) and by what exact options were used when creating the original tarballs. Because of this, pristine-tar currently has a few embedded copies of old versions of compressors to be able to reconstruct tarballs produced by them, and also rely on a ever-evolving patch to tar that is been carried in Debian for a while.&lt;/p&gt;

&lt;p&gt;So basically keeping pristine-tar working is a game of &lt;a href="https://en.wikipedia.org/wiki/Whac-A-Mole"&gt;Whac-A-Mole&lt;/a&gt;. Joey provided a &lt;a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737871"&gt;good summary of the situation when he orphaned pristine-tar&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Going forward, we may need to rely on other ways of ensuring integrity of upstream source code. That could take the form of signed git tags, signed uncompressed tarballs (so that the compression doesn’t matter), or maybe even a different system for storing actual tarballs. &lt;a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871806"&gt;Debian bug #871806&lt;/a&gt; contains an interesting discussion on this topic.&lt;/p&gt;

&lt;h2&gt;Recent improvements&lt;/h2&gt;

&lt;p&gt;Even if keeping pristine-tar useful in the long term will be hard, too much of Debian work currently relies on it, so we can’t just abandon it. Instead, we keep figuring out ways to improve. And I have good news: pristine-tar has recently received updates that improve the situation quite a bit.&lt;/p&gt;

&lt;p&gt;In order to be able to understand how better we are getting at it, I created a "visualization of the &lt;a href="https://people.debian.org/~terceiro/pristine-tar/"&gt;regression test suite results&lt;/a&gt;. With the help of data from there, let’s look at the improvements made since pristine-tar 1.38, which was the version included in stretch.&lt;/p&gt;

&lt;h3&gt;pristine-tar 1.39: xdelta3 by default.&lt;/h3&gt;

&lt;p&gt;This was the first release made after the stretch release, and made &lt;code&gt;xdelta3&lt;/code&gt; the default delta generator for newly-imported tarballs. Existing tarballs with deltas produced by &lt;code&gt;xdelta&lt;/code&gt; are still supported, this only affects new imports.&lt;/p&gt;

&lt;p&gt;The support for having multiple delta generator was written by Tomasz, and was already there since 1.35, but we decided to only flip the switch after using xdelta3 was supported in a stable release.&lt;/p&gt;

&lt;h3&gt;pristine-tar 1.40: improved compression heuristics&lt;/h3&gt;

&lt;p&gt;pristine-tar uses a few heuristics to produce the smaller delta possible, and this includes trying different compression options. In the release Tomasz included a contribution by Lennart Sorensen to also try &lt;code&gt;--gnu&lt;/code&gt;, which greatly improved the support for rsyncable gzip compressed files. We can see an example of the type of improvement we got in the &lt;a href="https://people.debian.org/~terceiro/pristine-tar/"&gt;regression test suite data for delta sizes&lt;/a&gt; for &lt;code&gt;faad2_2.6.1.orig.tar.gz&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src="/oldposts/images/pristine-tar-updates/faad.png" title="In 1.40, the delta produced from the test tarball faad2_2.6.1.orig.tar.gz went down from 800KB, almost the same size of tarball itself, to 6.8KB" alt="In 1.40, the delta produced from the test tarball faad2_2.6.1.orig.tar.gz went down from 800KB, almost the same size of tarball itself, to 6.8KB"&gt;&lt;/p&gt;

&lt;h3&gt;pristine-tar 1.41: support for signatures&lt;/h3&gt;

&lt;p&gt;This release saw the addition of support for storage and retrieval of upstream signatures, contributed by Chris Lamb.&lt;/p&gt;

&lt;h3&gt;pristine-tar 1.42: optionally recompressing tarballs&lt;/h3&gt;

&lt;p&gt;I had this idea and wanted to try it out: most of our problems reproducing tarballs come from tarballs produced with old compressors, or from changes in compressor behavior, or from uncommon compression options being used. What if we could just recompress the tarballs before importing then? Yes, this kind of breaks the “pristine” bit of the whole business, but on the other hand, 1) the contents of the tarball are not affected, and 2) even if the initial tarball is not bit by bit the same that upstream release, at least future uploads of that same upstream version with Debian revisions can be regenerated just fine.&lt;/p&gt;

&lt;p&gt;In some cases, as the case for the test tarball &lt;code&gt;util-linux_2.30.1.orig.tar.xz&lt;/code&gt;, recompressing is what makes it possible to reproduce the tarball (and thus import it with pristine-tar) possible at all:&lt;/p&gt;

&lt;p&gt;&lt;img src="/oldposts/images/pristine-tar-updates/util-linux.png" title="util-linux_2.30.1.orig.tar.xz can only be imported after being recompressed" alt="util-linux_2.30.1.orig.tar.xz can only be imported after being recompressed"&gt;&lt;/p&gt;

&lt;p&gt;In other cases, if the current heuristics can’t produce a reasonably small delta, recompressing makes a huge difference. It’s the case for &lt;code&gt;mumble_1.1.8.orig.tar.gz&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src="/oldposts/images/pristine-tar-updates/mumble.png" title="with recompression, the delta produced from mumble_1.1.8.orig.tar.gz goes from 1.2MB, or 99% of the size to the original tarball, to 14.6KB, 1% of the size of original tarball" alt="with recompression, the delta produced from mumble_1.1.8.orig.tar.gz goes from 1.2MB, or 99% of the size to the original tarball, to 14.6KB, 1% of the size of original tarball"&gt;&lt;/p&gt;

&lt;p&gt;Recompressing is not enabled by default, and can be enabled by passing the &lt;code&gt;--recompress&lt;/code&gt; option. If you are using &lt;code&gt;pristine-tar&lt;/code&gt; via a wrapper tool like &lt;code&gt;gbp-buildpackage&lt;/code&gt;, you can use the &lt;code&gt;$PRISTINE_TAR&lt;/code&gt; environment variable to set options that will affect any pristine-tar invocations.&lt;/p&gt;

&lt;p&gt;Also, even if you enable recompression, pristine-tar will only try it if the delta generations fails completely, of if the delta produced from the original tarball is too large. You can control what “too large” means by using the &lt;code&gt;--recompress-threshold-bytes&lt;/code&gt; and &lt;code&gt;--recompress-threshold-percent&lt;/code&gt; options. See the &lt;strong&gt;pristine-tar(1)&lt;/strong&gt; manual page for details.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:terceiro.xyz,2017-05-28:/2017/05/28/debian-ci-new-data-retention-policy/</id>
    <title type="html">Debian CI: new data retention policy</title>
    <published>2017-05-28T21:20:00Z</published>
    <updated>2017-05-28T21:20:00Z</updated>
    <link rel="alternate" href="https://terceiro.xyz/2017/05/28/debian-ci-new-data-retention-policy/" type="text/html"/>
    <content type="html">&lt;p&gt;When I started &lt;a href="https://packages.debian.org/debci"&gt;debci&lt;/a&gt; for
&lt;a href="https://ci.debian.net/"&gt;Debian CI&lt;/a&gt;, I went for the simplest thing that could
possibly work. One of the design decisions was to use the filesystem directly
for file storage. A large part of the Debian CI data is log files and test
artifacts (which are just files), and using the filesystem directly for storage
makes it a lot easier to handle it. The rest of the data which is structured
(test history and status of packages) is stored as JSON files.&lt;/p&gt;

&lt;p&gt;Another nice benefit of using the filesystem like this is that I get a sort of
REST API for free by just exposing &lt;a href="https://ci.debian.net/data/"&gt;the file
storage&lt;/a&gt; to the web. For example, getting the
latest test status of debci itself on unstable/amd64 is as easy as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ curl https://ci.debian.net/data/packages/unstable/amd64/d/debci/latest.json
{
  "run_id": "20170528_173652",
  "package": "debci",
  "version": "1.5.1",
  "date": "2017-05-28 17:43:05",
  "status": "pass",
  "blame": [],
  "previous_status": "pass",
  "duration_seconds": "373",
  "duration_human": "0h 6m 13s",
  "message": "Tests passed, but at least one test skipped",
  "last_pass_version": "1.5.1",
  "last_pass_date": "2017-05-28 17:43:05"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, nothing in life is without compromises. One big disadvantage of the way
debci stored its data is that there were &lt;strong&gt;a lot&lt;/strong&gt; of files, which ends up using
a large number of inodes in the filesystem. The current Debian CI master has
more than 10 million inodes in its filesystem, and almost all of them were
being used. This is clearly unsustainable.&lt;/p&gt;

&lt;p&gt;You will notice that I said &lt;em&gt;stored&lt;/em&gt;, because as of version 1.6, debci now
implements a data retention policy: log files and test artifacts will now only
be kept for a configurable amount of days (default: 180).&lt;/p&gt;

&lt;p&gt;So there you have it: effective immediately, Debian CI will not provide logs
and test artifacts older than 180 days.&lt;/p&gt;

&lt;p&gt;If you are reporting bugs based on logs from Debian CI, please don’t hotlink
the log files. Instead, make sure you download the logs in question and attach
them to the bug report, because in 6 months they will be gone.&lt;/p&gt;
</content>
  </entry>
</feed>

