O conteúdo do arquivo apt é revertido na inicialização

1

Estou tendo um Raspberry PI sem cabeçalho debian que executa um Owncloud server .

Os arquivos de instalação do apt owncloud costumavam estar localizados aqui:

link

, criei um arquivo chamado owncloud.list no meu diretório /etc/apt/sources.list com o seguinte:

deb link /

A chave correspondente foi instalada no apt e tudo funcionou bem.

Agora o owncloud alterou a localização dos arquivos de instalação para isso:

link

e eu mudei o conteúdo do owncloud.list para este:

deb link /

e adicionou a chave correspondente ao apt.

Tudo funciona de novo, o Owncloud é atualizado, exceto quando eu inicializo o sistema. Em seguida, o conteúdo antigo do arquivo owncloud.list aparece novamente e a chave antiga.

Então eu tenho que alterar manualmente o owncloud.list e importar a nova chave novamente.

O que está acontecendo aqui?

Eu segui as instruções mencionadas abaixo. O estado do sistema é logo após uma inicialização. Observe a data do arquivo owncloud.list. Eu editei 2 dias atrás seguindo as instruções. Então aqui vamos nós:

root@RAPI2-V2:/etc/apt/sources.list.d# ls -l
total 8
-rw-r--r-- 1 root root  76 Apr 18  2016 owncloud.list
-rw-r--r-- 1 root root 193 Nov 21  2015 raspi.list
root@RAPI2-V2:/etc/apt/sources.list.d# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   2048R/90FDDD2E 2012-04-01
uid                  Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <[email protected]>
sub   2048R/5373DC6C 2012-04-01

pub   2048R/7FA3303E 2012-06-17
uid                  Raspberry Pi Archive Signing Key
sub   2048R/EDD83D6C 2012-06-17

pub   2048R/5180350A 2015-10-08 [expired: 2017-12-16]
uid                  ce OBS Project <[email protected]>

pub   2048R/479BC94B 2013-08-26 [expired: 2018-08-25]
uid                  ownCloud build service <obsrun@localhost>

pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>

pub   4096R/2B90D010 2014-11-21 [expires: 2022-11-19]
uid                  Debian Archive Automatic Signing Key (8/jessie) <[email protected]>

root@RAPI2-V2:/etc/apt/sources.list.d# cat /etc/apt/sources.list && cat /etc/apt/sources.list.d/*
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://ftp.debian.org/debian jessie-backports main
deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui

Erros de atualização do apt-get:

root@RAPI2-V2:/etc/apt/sources.list.d# apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Get:1 http://ftp.debian.org jessie-backports InRelease [166 kB]
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://ftp.debian.org jessie-backports/main armhf Packages
Get:2 http://download.owncloud.org  InRelease [145 B]
Ign http://download.owncloud.org  InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Get:3 http://download.owncloud.org  Release.gpg [481 B]
Hit http://ftp.debian.org jessie-backports/main Translation-en
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Get:4 http://download.owncloud.org  Release [981 B]
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Err http://download.owncloud.org  Release

Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 168 kB in 15s (11.1 kB/s)
W: An error occurred during the signature verification. 

O repositório não é atualizado e os arquivos de índice anteriores serão usados. Erro de GPG: link Lançamento: As seguintes assinaturas não eram válidas: KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163644 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163442 KEYEXPIRED 1535163644

W: Failed to fetch http://download.owncloud.org/download/repositories/stable/Debian_8.0/Release

W: Some index files failed to download. They have been ignored, or old ones used instead.
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

Eu tentei o dpkg --configure -a , mas isso não funciona.

Agora, se eu atualizar o owncloud.list e adicionar a chave de acordo com as instruções, o erro desaparecerá:

root@RAPI2-V2:/etc/apt/sources.list.d# cat owncloud.list
deb http://download.owncloud.org/download/repositories/production/Debian_8.0/ /
root@RAPI2-V2:/etc/apt/sources.list.d# apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://ftp.debian.org jessie-backports InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://ftp.debian.org jessie-backports/main armhf Packages
Get:1 http://download.owncloud.org  InRelease [145 B]
Ign http://download.owncloud.org  InRelease
Get:2 http://download.owncloud.org  Release.gpg [481 B]
Hit http://ftp.debian.org jessie-backports/main Translation-en
Get:3 http://download.owncloud.org  Release [981 B]
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Get:4 http://download.owncloud.org  Packages [739 B]
Get:5 http://download.owncloud.org  Translation-en_GB [145 B]
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Get:6 http://download.owncloud.org  Translation-en [145 B]
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Get:7 http://download.owncloud.org  Translation-en_GB [145 B]
Get:8 http://download.owncloud.org  Translation-en [145 B]
Get:9 http://download.owncloud.org  Translation-en_GB [145 B]
Get:10 http://download.owncloud.org  Translation-en [145 B]
Get:11 http://download.owncloud.org  Translation-en_GB [145 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Get:12 http://download.owncloud.org  Translation-en [145 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Get:13 http://download.owncloud.org  Translation-en_GB [145 B]
Ign http://download.owncloud.org  Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Get:14 http://download.owncloud.org  Translation-en [145 B]
Ign http://download.owncloud.org  Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 2,201 B in 14s (146 B/s)
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

A execução do dpkg --configure -a remove o último erro e o apt-get update é isento de erros.

Este é o conteúdo principal após a atualização:

root@RAPI2-V2:/etc/apt/sources.list.d# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   2048R/90FDDD2E 2012-04-01
uid                  Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <[email protected]>


sub   2048R/5373DC6C 2012-04-01

pub   2048R/7FA3303E 2012-06-17
uid                  Raspberry Pi Archive Signing Key
sub   2048R/EDD83D6C 2012-06-17

pub   2048R/5180350A 2015-10-08 [expired: 2017-12-16]
uid                  ce OBS Project <[email protected]>

pub   2048R/479BC94B 2013-08-26 [expires: 2023-08-23]
uid                  ownCloud build service <obsrun@localhost>
sub   2048R/8DE365D9 2013-08-26 [expires: 2023-08-23]
sub   2048D/86EB6027 2013-08-26 [expires: 2023-08-23]

pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>

pub   4096R/2B90D010 2014-11-21 [expires: 2022-11-19]
uid                  Debian Archive Automatic Signing Key (8/jessie) <[email protected]>

Agora, se eu reiniciar. O arquivo owncloud.list reverte para a versão antiga e a nova chave desapareceu.

Nova atualização:

fez uma reinicialização. Quando isso aconteceu, eu fiz:

remover chave

adicionar chave

altere owncloud.list

apt-get update

Tem o erro:

E: dpkg foi interrompido, você deve executar manualmente 'dpkg --configure -a' para corrigir o problema.

Ran a dpkg --configure -a then

apt-get update

Sem erros.

Nova reinicialização.

O arquivo owncloud.list foi revertido novamente

E agora eu descobri que o problema não está relacionado apenas aos arquivos do apt / dpkg, o diretório inicial do root ficou assim antes da reinicialização:

root@RAPI2-V2:/etc/apt/sources.list.d# ls -ltr ~
total 3376
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Videos
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Templates
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Public
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Pictures
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Music
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Downloads
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Documents
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Desktop
-rw-r--r-- 1 root     root      355681 Dec 15  2015 installed.txt
-rw-r--r-- 1 root     root       36430 Jan 27  2016 installed-programs.txt
-rwxr-xr-x 1 root     root       24994 Mar  4  2016 speedtest-cli
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.2
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.1
-rw-r--r-- 1 root     root      509192 Mar 24  2016 contacts.tar.gz
-rw-r--r-- 1 root     root      185921 Apr 14  2016 packages.txt
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages2.txt
-rwxr-xr-- 1 root     root         105 Apr 14  2016 disable-updatechecker.config.php
-rw-r--r-- 1 www-data www-data      20 Apr 14  2016 phpinfo.php
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages3.txt
-rw-r--r-- 1 root     root      253800 Apr 16  2016 speetest-servers.txt
-rw-r--r-- 1 root     root      179471 Apr 16  2016 packages4.txt
-rw-r--r-- 1 root     root     1193779 Apr 17  2016 calendar.tar.gz
-rw-r--r-- 1 root     root       68857 Apr 19  2016 owncloud.tar.gz
-rw-r--r-- 1 root     root      185696 Nov 20  2017 inst.txt
-rwxr-xr-x 1 root     root         175 May 21  2018 Backup-to-TorFtp.cmd
-rw-r--r-- 1 root     root        4485 Sep 18 11:39 Release-new.key

Observe que excluí o arquivo Release.key . Eu baixei para o arquivo Release-new.key . Agora, após a reinicialização, o diretório inicial é assim:

root@RAPI2-V2:~# ls -ltr ~
total 3372
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Videos
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Templates
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Public
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Pictures
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Music
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Downloads
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Documents
drwxr-xr-x 2 root     root        4096 Dec 14  2015 Desktop
-rw-r--r-- 1 root     root      355681 Dec 15  2015 installed.txt
-rw-r--r-- 1 root     root       36430 Jan 27  2016 installed-programs.txt
-rwxr-xr-x 1 root     root       24994 Mar  4  2016 speedtest-cli
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.2
-rw-r--r-- 1 root     root        1003 Mar 22  2016 Release.key.1
-rw-r--r-- 1 root     root      509192 Mar 24  2016 contacts.tar.gz
-rw-r--r-- 1 root     root        1358 Apr  7  2016 Release.key
-rw-r--r-- 1 root     root      185921 Apr 14  2016 packages.txt
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages2.txt
-rwxr-xr-- 1 root     root         105 Apr 14  2016 disable-updatechecker.config.php
-rw-r--r-- 1 www-data www-data      20 Apr 14  2016 phpinfo.php
-rw-r--r-- 1 root     root      186367 Apr 14  2016 packages3.txt
-rw-r--r-- 1 root     root      253800 Apr 16  2016 speetest-servers.txt
-rw-r--r-- 1 root     root      179471 Apr 16  2016 packages4.txt
-rw-r--r-- 1 root     root     1193779 Apr 17  2016 calendar.tar.gz
-rw-r--r-- 1 root     root       68857 Apr 19  2016 owncloud.tar.gz
-rw-r--r-- 1 root     root      185696 Nov 20  2017 inst.txt
-rwxr-xr-x 1 root     root         175 May 21  2018 Backup-to-TorFtp.cmd

Agora, o Release-new.key desapareceu e o arquivo Release.key foi reajustado.

O que diabos está acontecendo? Parece que o cartão SD não está atualizado, mas como isso pode acontecer sem erros no syslog ou no kern.log? Toda vez que é iniciado, também acho que é o dia 17 de setembro. A única mensagem suspeita:

Sep 17 19:17:09 RAPI2-V2 kernel: [    5.785232] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Sep 17 19:17:09 RAPI2-V2 kernel: [    8.230865]  sda: sda1

Eu executei fsck. Sem queixas.

    
por Thomas D 20.11.2018 / 13:05

1 resposta

0

O problema não está relacionado ao apt / dpkg, é sobre I / O não escrito no cartão SD. Sem mensagens de erro. Aparentemente, o cartão SD reporta status de E / S com sucesso, mesmo quando nada foi gravado no cartão. Vou levantar uma questão no fórum RaPi.

    
por 21.11.2018 / 20:54

Tags