Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6267819
  • 博文数量: 2759
  • 博客积分: 1021
  • 博客等级: 中士
  • 技术积分: 4091
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-11 14:14
文章分类

全部博文(2759)

文章存档

2019年(1)

2017年(84)

2016年(196)

2015年(204)

2014年(636)

2013年(1176)

2012年(463)

分类: LINUX

2016-09-29 03:27:08

1.dupload *.changes
能将我们的软件上传到服务器上
但不是按照 pool/main/a/aalib/
而是将所有的放在信息放在 服务器的 / 目录下

研究结果使用 dupload + Reprepro创建成功
Code:

#!/bin/bash
echo "********** REPO CONTROL SCRIPT **********"
echo "******* CLOSE GEDIT TEXT EDITORS! *******"
echo "*                                       *"

cd /home/user/Documents
mkdir -p Original_debs
mkdir -p Output_debs
mkdir -p tmp/DEBIAN
echo -n "Name of File with extension (Example: program.deb) > "
read FILE
cp $FILE /home/user/Documents/Original_debs/
dpkg-deb -x $FILE tmp/
dpkg-deb --control $FILE tmp/DEBIAN
echo "DEPACKAGING DONE. OPENING CONTROL FILE FOR EDIT..."
cd /home/user/Documents/tmp/DEBIAN
gedit control
cd /home/user/Documents/
echo "EDITING DONE."

echo "REPACKAGING..."
dpkg-deb -b tmp $FILE
cp $FILE /home/user/Desktop/repository/deb/
rm -r tmp/
echo "REPACKAGING COMPLETE. TEMP FILES REMOVED."


echo "REBUILDING REPOSITORY INFORMATION..."

cd /home/user/Desktop/repository/
dpkg-scanpackages -m . /dev/null | bzip2 -9c >Packages.bz2
dpkg-scanpackages -m . /dev/null | gzip -9c >Packages.gz

echo "REBUILDING REPOSITORY INFORMATION COMPLETE."


echo "FTP PROCESS IN PROGRESS...UPDATING REPOSITORY..."
ftp -n  my.webhost.com<
quote USER username
quote PASS password
cd public_html
cd deb
lcd /home/user/Desktop/repository/deb/
put $FILE
cd ..
lcd /home/user/Desktop/repository/
put Packages.bz2
put Packages.gz
put Release
by
END_SCRIPT
echo -n "FTP PROCESS DONE. "

cd /home/user/Documents/
mv $FILE /home/user/Documents/Output_debs/
cd /
echo "REPOSITORY UPDATED!"

echo "*                                       *"
echo "********** REPO CONTROL SCRIPT **********"

dpkg-scanpackages -m . /dev/null | bzip2 -9c >Packages.bz2

使用Reprepro创建成功
Origin: Your Name
Label: Your own label
Suite: stable
Codename: sarge
Version: 3.1
Architectures: i386 all source
Components: main non-free contrib
Description: Your description

Origin: Your Name
Label: Your own label
Suite: unstable
Codename: sid
Architectures: i386 all source
Components: main non-free contrib
Description: Your description


skx@lappy:~/apt$ reprepro -Vb . include sarge \ 
    /home/skx/debian/sarge/reprepro/reprepro_0.6-1sarge0_i386.changes 
Created directory "./db"
Created directory "./pool"
Created directory "./pool/main"
Created directory "./pool/main/r"
Created directory "./pool/main/r/reprepro"
db: 'reprepro' added to 'sarge|main|i386'.
db: 'reprepro' added to 'sarge|main|source'.
Created directory "./dists"
Created directory "./dists/sarge"
Created directory "./dists/sarge/main"
Created directory "./dists/sarge/main/binary-i386"
  writing to './dists/sarge/main/binary-i386/Packages.new'...
  writing to './dists/sarge/main/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/main/binary-all"
  writing to './dists/sarge/main/binary-all/Packages.new'...
  writing to './dists/sarge/main/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/main/source"
  writing to './dists/sarge/main/source/Sources.gz.new'...
Created directory "./dists/sarge/non-free"
Created directory "./dists/sarge/non-free/binary-i386"
  writing to './dists/sarge/non-free/binary-i386/Packages.new'...
  writing to './dists/sarge/non-free/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/non-free/binary-all"
  writing to './dists/sarge/non-free/binary-all/Packages.new'...
  writing to './dists/sarge/non-free/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/non-free/source"
  writing to './dists/sarge/non-free/source/Sources.gz.new'...
Created directory "./dists/sarge/contrib"
Created directory "./dists/sarge/contrib/binary-i386"
  writing to './dists/sarge/contrib/binary-i386/Packages.new'...
  writing to './dists/sarge/contrib/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/contrib/binary-all"
  writing to './dists/sarge/contrib/binary-all/Packages.new'...
  writing to './dists/sarge/contrib/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/contrib/source"
  writing to './dists/sarge/contrib/source/Sources.gz.new'...

sudo reprepro -Vb . includedeb lucid ../ubuntu10.04/pool/main/libpa*.deb

more conf/distributions 
Origin: sns.akaedu.org
Label: Ubuntu
Suite: stable
Codename: lucid
Version: 10.04
Architectures: mipsel binary
Components: main free non-free
Description: Ubuntu 10.04  package repositories for mipsel(loongson)
Log: /var/log/repos/lucid.log
阅读(1300) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~