2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

debianfhemde: initial commit

git-svn-id: https://svn.fhem.de/fhem/trunk@13509 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2017-02-25 12:40:03 +00:00
parent 2522c2d3d2
commit 04e7dcc15e
16 changed files with 489 additions and 0 deletions

View File

@ -0,0 +1,97 @@
--------------------------------------------------------------------------------
Nutzung der Skripte zur Erstellung und Pflege von http://debian.fhem.de
$Id:$
--------------------------------------------------------------------------------
Annahmen:
1. der gesamte Ordner liegt im home-Verzeichnis eines Linux Users
2. der Linux User benötigt root-Rechte auf die Befehle rm und chown
Eintrag in /etc/sudoers für user debianfhemde:
debianfhemde ALL = NOPASSWD: /bin/chown, /bin/rm
3. der gpg key für das Signieren wurde erstellt
$ gpg --gen-key
und der öffentliche Teil wurde nach ./debianfhemde/archive.key exportiert
$ gpg --armor --export "<name der bei der key erzeugung angegeben wurde>" > ~/debianfhemde/archive.key
Tipp: Man sollte auch eine Widerrufsurkunde erstellen und sicher verwahren:
$ gpg --output revoke.asc --gen-revoke "<name der bei der key erzeugung angegeben wurde>"
--------------------------------------------------------------------------------
Erstellung des stable Repository
1. das aktuelle fhem.deb muss von http://fhem.de geladen werden,
diese Datei kommt in das Verzeichnis ./debianfhemde/stable
2. die Datei muss auch in ./debianfhemde verfügbar sein,
entweder als symlink auf die Datei in stable oder als Kopie
(AWS S3 unterstützt beispielsweise keine Links!)
3. ./scripts/mkfhemstable muss einmalig ausgeführt werden
--------------------------------------------------------------------------------
Erstellung des nightly Repository
1. fhem muss erstmalig manuell aus SVN nach fhem.svn ausgecheckt werden
2. in ./scripts/mkfhemnightly muss am Ende des Skripts die Synchronisation geprüft und ggf. angepaßt werden
3. ./scripts/mkfhemnightly einmalig ausführen, um alle benötigten Dateien initial zu erstellen
und um zu testen, ob der gesamte Ablauf korrekt funktioniert
4. cronjob einplanen, um die Generierung täglich auszuführen
(Empfehlung: morgens um 8 Uhr, damit das nightly build weitestgehend mit dem offiziellen update übereinstimmt)
--------------------------------------------------------------------------------
Komplette Baumstruktur:
debianfhemde/
|-- archive.key
|-- fhem-5.8.deb
|-- grafik
| |-- favicon.ico
| `-- fhemicon.png
|-- html
| |-- default.html
| |-- gpg_trouble.html
| |-- https_trouble.html
| |-- manual.html
| |-- nightly.html
| `-- stable.html
|-- index.html
|-- nightly
| |-- Packages
| |-- Release
| |-- Release.gpg
| `-- fhem-5.8.deb
|-- robots.txt
|-- stable
| |-- Packages
| |-- Release
| |-- Release.gpg
| `-- fhem-5.8.deb
`-- style
`-- style.css
scripts/
|-- mkfhemnightly
|-- mkfhemstable
`-- templates
|-- index.template
|-- major.shtml
|-- manual.template
|-- nightly.template
`-- nversion.shtml
--------------------------------------------------------------------------------
2017-02-25 - betateilchen
--------------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,21 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<script type="text/javascript">
if (top == self) top.location = "../index.html";
</script>
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<h2>Several ways to install FHEM on Debian-based systems</h2>
All procedures are intended to create FHEM installations from scratch. <br/>
Do not use these procedures for updates/upgrades!<br/>
<br/>
<font color="red"><b>gpg key changed on 2016-12-26,</b><br>
see section "gpg key Trouble" in navigation bar for further details.</font>
</body>
</html>

View File

@ -0,0 +1,43 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<script type="text/javascript">
if (top == self) top.location = "../index.html";
</script>
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<a name="trouble"></a>
<h3>Having trouble in use of apt-get update?</h3>
<ul>
<br/>
If you get an error like this: GPG-Fehler:<br/>
<br/>
<b>http://debian.fhem.de/ / Release: [...] NO_PUBKEY xxxxxxxx</b><br/>
</ul>
<ul>
Try the following steps:<br/>
<br/>
<li><b>Find the old gpg key</b><br/></br>
<ul><code>sudo apt-key list<br/>
<br/>
pub 2048R/<b>BF0E6825</b> 2014-10-05 [verf&auml;llt: 2024-10-02]<br/>
uid "..." (betateilchen) &lt;repo@betateilchen.de&gt;</code></ul></li><br/>
<li><b>Delete the old key identified in previos step</b><br/></br>
<ul><code>sudo apt-key del <b>BF0E6825</b></code></ul></li></br>
<li><b>Import new gpg key</b><br/></br>
<ul><code>wget -qO - http://debian.fhem.de/archive.key | sudo apt-key add -</code></ul></li><br/>
<li><b>Check result</b><br/></br>
<ul><code>sudo apt-key list<br/>
<br/>
pub 4096R/<b>CC0B9B66</b> 2016-12-26 [verf&auml;llt: 2021-12-25]<br/>
uid betateilchen (debian.fhem.de) &lt;gpg@betateilchen.de&gt;</code></ul></li><br/></ul>
<br/>
</body>
</html>

View File

@ -0,0 +1,28 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<script type="text/javascript">
if (top == self) top.location = "../index.html";
</script>
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<a name="trouble"></a>
<h3>Having trouble when connecting apt via https?</h3>
<ul>
Try the following steps:<br/>
<br/>
<li><b>Importing repository gpg key fails (with certificate or gpg error)</b><br/></br>
<ul><code>wget --no-check-certificate -qO - https://debian.fhem.de/archive.key | apt-key add -</code></ul></li><br/>
<li><b>apt-get update fails with "no driver for https"</b><br/></br>
<ul><code>apt-get install apt-transport-https</code></ul></li></br>
<li><b>apt-get update still fails becaus of https</b><br/></br>
<ul><code>echo 'Acquire::https::debian.fhem.de::Verify-Peer "false";' > /etc/apt/apt.conf.d/30nohttps</code></ul></li><br/>
</ul>
<br/>
</body>
</html>

View File

@ -0,0 +1,30 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<script type="text/javascript">
if (top == self) top.location = "../index.html";
</script>
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<a name="stable"></a>
<h3>Use aptitude to install fhem (stable package from current release) and all dependencies</h3>
<ul>
<li>Import repository gpg key:<br/><br/>
<ul><code>wget -qO - http://debian.fhem.de/archive.key | apt-key add -</code></ul></li><br/>
<li>Add repository to /etc/apt/sources.list:<br/></br>
<ul><code>deb http://debian.fhem.de/stable/ /</code></ul></li><br/>
<li>Update your package administration:<br/></br>
<ul><code>apt-get update</code></ul></li></br>
<li>Install fhem:<br/></br>
<ul><code>apt-get install fhem</code></ul></li><br/>
<li>(optional) Remove repository from /etc/apt/sources.list:<br/></br>
<ul><code>#deb http://debian.fhem.de/stable/ /</code></ul></li><br/>
</ul>
<br/>
</body>
</html>

View File

@ -0,0 +1,3 @@
User-agent: *
Disallow: /

View File

@ -0,0 +1,80 @@
body { background-color: #FFFFE7;
font-family:Arial, sans-serif; font-size:16px;}
input { font-family:Arial, sans-serif; font-size:16px; }
select { font-family:Arial, sans-serif; font-size:16px; }
#aws { margin-top:10px; margin-left:30px; width:120px; height:45px;
content:url(../grafik/aws.png); }
#logo { margin-top:10px; margin-left:30px; width:120px; height:132px;
background-image:url(../grafik/fhemicon.png); }
#menu { margin-top:10px; margin-left:20px; width:140px; }
#menuScrollArea { width: 175px; left:0px; top:0px; height:100%;
position:fixed; overflow-x:hidden; overflow-y:auto; }
#hdr { position:absolute; top:10px; left:180px; }
#content { position:absolute; top:50px; left:180px; bottom:20px; right:10px; }
#connect_err { background-color: #000000; color: #FFFFFF;
position:absolute; top:0px; left:40px; z-index: 10; }
.devType { padding-top:20px; }
a { color: #278727; }
p.a { color: #278727; }
img { border-style: none; }
.wide { width:100%; }
table.block { border:1px solid gray; background: #F8F8E0; }
table.block tr.odd { background: #F0F0D8; }
table.block tr.sel { background: #F0F0D8; }
table { border-radius:8px; }
table.room { border:1px solid gray; width: 100%; background: #D7FFFF; }
table.room tr.sel { background: #A0FFFF; }
#right { position:absolute; top:0px; left:180px; width:80%; height:100%; }
h2,h3,h4 { color:#52865D; line-height:1.3;
margin-top:1.5em; font-family:Arial,Sans-serif; }
div.dist { padding-top:0.3em; }
div.clock { }
button.dist { margin:10px; background:transparent; border:0px; cursor:pointer; }
a img { border-style:none; }
.col2 { text-align:center; }
/* detail-selector & slider */
.makeTable { display:inline; float:left; clear:left;
margin-top:10px; margin-bottom:20px;}
.makeSelect { display:inline; float:left; clear:left; }
select { margin-left:5px; margin-right:5px; }
.get,.set,.attr { margin-bottom:5px; float:left; }
.slider { float:left; width:250px; height:26px; }
/* detail only */
.makeSelect .slider {background:#F0F0D8; border-radius:8px;}
/* timepicker */
.set .set { margin-bottom:2px; margin-top:3px; }
.handle { position:relative; cursor:pointer; width:50px;
height:20px; line-height:20px;
-webkit-user-select:none; -moz-user-select:none; -user-select:none;
border:3px solid; color:#278727; text-align:center; }
.downText { margin-top:2px; }
pre { white-space: pre-wrap; }
svg { height:32px; width:32px; fill:#278727; }
svg.on,svg.FS20_on { fill:orange; }
/* next lines are for remotecontrol */
.rc_body { border-style: solid; border-color: gray; border-width: 2px; padding: 5px;
background: #C8C8B0; font-size:6px;}
.rc_button { padding: 5px 7px;}
.rc_button img { border-style: solid; border-width: 1px; border-color: transparent; }
.rc_button img:active { border-color: gray; }
.changed { color:red; }

View File

@ -0,0 +1,63 @@
#!/bin/sh
#
# create nightly build and transfer it to static webspace
# (C) 2013-2017 betateilchen
#
clear
# remove old version infos
#
rm ~/scripts/templates/nversion.shtml
rm ~/scripts/templates/major.shtml
# update svn repo
#
cd ~/fhem.svn
svn update
# replace version infos in various html files
# because Amazon S3 does not support shtml
#
svn info | grep 'Revision' | awk '{ print $2; }' > ~/scripts/templates/nversion.shtml
cat Makefile |grep '^VERS=' |sed 's/VERS=//' |sed 's/\r//' > ~/scripts/templates/major.shtml
cd ~/scripts
cp templates/index.template index.html
sed -i s/==MINOR==/`cat templates/nversion.shtml`/g index.html
mv index.html ../debianfhemde/
cp templates/nightly.template nightly.html
sed -i s/==MAJOR==/`cat templates/major.shtml`/g nightly.html
sed -i s/==MINOR==/`cat templates/nversion.shtml`/g nightly.html
mv nightly.html ../debianfhemde/html/
B
cp templates/manual.template manual.html
sed -i s/==MAJOR==/`cat templates/major.shtml`/g manual.html
mv manual.html ../debianfhemde/html/
# build nightly deb package
#
cd ~/fhem.svn
make deb
mv fhem-5.8.deb ~/debianfhemde/nightly
# create package informations for aptitude
# and sign all the stuff
#
cd ~/debianfhemde/nightly
apt-ftparchive packages . > Packages
apt-ftparchive release . > Release
gpg --batch --yes --passphrase anton1142 --output Release.gpg -bas Release
# sync to Amazon S3 Instance
#
cd ~/debianfhemde
aws s3 sync . s3://debian.fhem.de --delete
###

View File

@ -0,0 +1,6 @@
#!/bin/sh
cd ~/debianfhemde/stable
apt-ftparchive packages . > Packages
apt-ftparchive release . > Release
gpg --batch --yes --passphrase anton1142 --output Release.gpg -bas Release

View File

@ -0,0 +1,53 @@
<html>
<head>
<title>FHEM for Debian</title>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<link rel="icon" type="image/x-icon" href="./grafik/favicon.ico" />
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<table><tr><td> <!-- Playing with the width -->
<table class="room">
<tr><td></td></tr>
<tr><td><b>Content:</b></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="parent.rightcontent.location.href='./html/default.html'">Start</p></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="parent.rightcontent.location.href='./html/manual.html'">Manual installation</p></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="parent.rightcontent.location.href='./html/stable.html'">Stable build using apt</p></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="parent.rightcontent.location.href='./html/nightly.html'">Nightly ==MINOR== using apt</p></td></tr>
<tr><td></td></tr>
<!-- <tr><td><p class="a" onclick="parent.rightcontent.location.href='./html/https_trouble.html'">https Trouble?</p></td></tr>
<tr><td></td></tr> -->
<tr><td><p class="a" onclick="parent.rightcontent.location.href='./html/gpg_trouble.html'">gpg key Trouble</p></td></tr>
<tr><td></td></tr>
<tr><td><hr/></td></tr>
<tr><td><b>Links:</b></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="window.open('http://fhem.de','_blank')">FHEM Home</p></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="window.open('https://forum.fhem.de','_blank')">FHEM Forum</p></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="window.open('http://www.fhemwiki.de','_blank')">FHEM Wiki</p></td></tr>
<tr><td></td></tr>
<tr><td><p class="a" onclick="window.open('https://verein.fhem.de','_blank')">FHEM Verein</p></td></tr>
<tr><td></td></tr>
</table>
</table>
</div>
<!-- <div id="aws"></div> -->
</div>
<div id="right"><iframe id="rightcontent" name="rightcontent" style="border:0px;" width="100%" height="100%" src="./html/default.html"></iframe></div>
</body>
</html>

View File

@ -0,0 +1,32 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<script type="text/javascript">
if (top == self) top.location = "../index.html";
</script>
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<a name="manual"></a>
<h3>Manual installation from console</h3>
<ul>
<li>Install prerequisits:<br/><br/>
<ul><code>apt-get -y install perl-base libdevice-serialport-perl libwww-perl libio-socket-ssl-perl libcgi-pm-perl libjson-perl sqlite3 libdbd-sqlite3-perl libtext-diff-perl libtimedate-perl libmail-imapclient-perl libgd-graph-perl libtext-csv-perl libxml-simple-perl liblist-moreutils-perl ttf-liberation libimage-librsvg-perl libgd-text-perl libsocket6-perl libio-socket-inet6-perl libmime-base64-perl libimage-info-perl libusb-1.0-0-dev libnet-server-perl</code></ul></li><br/>
<li>Download latest stable package:<br/><br/>
<ul><code>wget http://debian.fhem.de/fhem-==MAJOR==.deb</code></ul></li><br/>
<li>Install package:<br/><br/>
<ul><code>dpkg -i fhem.deb</code></ul></li><br/>
<li>If you want to add the fhem user manually, just run the following command::<br/><br/>
<ul><code>useradd --system --home /opt/fhem --gid dialout --shell /bin/false fhem</code></ul></li><br/>
<li>You can find the init-script as /opt/fhem/contrib/init-scripts/fhem.3 and copy this to /etc/init.d/fhem<br/><br/>
<ul><code>cp /opt/fhem/contrib/init-scripts/fhem.3 /etc/init.d/fhem<br/>
chmod a+x /etc/init.d/fhem<br/>
update-rc.d fhem defaults</code></ul></li>
</ul>
<br/>
</body>
</html>

View File

@ -0,0 +1,33 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<script type="text/javascript">
if (top == self) top.location = "../index.html";
</script>
<meta http-equiv="pragma" content="no-cache" />
</head>
<body>
<a name="nightly"></a>
<h3>Nightly builds (use it at your own risk!)</h3>
<ul>
<li>Import repository gpg key:<br/><br/>
<ul><code>wget -qO - http://debian.fhem.de/archive.key | apt-key add -</code></ul></li><br/>
<li>Add repository to /etc/apt/sources.list:<br/></br>
<ul><code>deb http://debian.fhem.de/nightly/ /</code></ul></li><br/>
<li>Update your package administration:<br/></br>
<ul><code>apt-get update</code></ul></li></br>
<li>Install fhem:<br/></br>
<ul><code>apt-get install fhem</code></ul></li><br/>
<li>You will find a special version number like<br/><br/>
<ul><code>Inst fhem (==MAJOR==.==MINOR== debian.fhem.de [all])</code></ul><br/>
<ul>with <code>==MAJOR==</code> representing major version</ul>
<ul>with <code>==MINOR==</code> representing the latest SVN commit included.</ul><br/>
<li>(optional) Remove repository from /etc/apt/sources.list:<br/></br>
<ul><code>#deb http://debian.fhem.de/nightly/ /</code></ul></li><br/>
</ul>
<br/>
</body>
</html>