Fix hostapd packages relationships

This commit is contained in:
zador-blood-stained 2016-08-10 18:53:15 +03:00
parent 4e9886bc0b
commit 06dc09291b
11 changed files with 89 additions and 22 deletions

View file

@ -1,7 +1,7 @@
# hostapd-realtek # hostapd-realtek
local package_name="hostapd-realtek" local package_name="hostapd-realtek"
local package_repo="http://w1.fi/hostap.git" local package_repo="http://w1.fi/hostap.git"
local package_ref="branch:hostap_2_5" local package_ref="tag:hostap_2_5"
local package_upstream_version="2.5" local package_upstream_version="2.5"
local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man" local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man"
local package_install_target="hostapd-realtek" local package_install_target="hostapd-realtek"

View file

@ -1,7 +1,7 @@
# hostapd # hostapd
local package_name="hostapd" local package_name="hostapd"
local package_repo="http://w1.fi/hostap.git" local package_repo="http://w1.fi/hostap.git"
local package_ref="branch:hostap_2_5" local package_ref="tag:hostap_2_5"
local package_upstream_version="2.5" local package_upstream_version="2.5"
local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man" local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man"
local package_install_target="hostapd" local package_install_target="hostapd"

View file

@ -0,0 +1,29 @@
ssid=SSID
interface=wlan0
hw_mode=g
channel=5
driver=nl80211
bridge=br0
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=2
preamble=1
wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
#country_code=SI
#ieee80211d=1
driver=rtl871xdrv
#5 Ghz example config
#hw_mode=a
#channel=108
#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]

View file

@ -31,8 +31,9 @@ Depends: ${shlibs:Depends},
${misc:Depends}, ${misc:Depends},
lsb-base lsb-base
Breaks: initscripts (<< 2.88dsf-13.3) Breaks: initscripts (<< 2.88dsf-13.3)
Provides: hostapd-realtek Provides: hostapd
Conflicts: hostapd Conflicts: hostapd, armbian-hostapd
Replaces: hostapd, armbian-hostapd
Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
Originally, hostapd was an optional user space component for Host AP Originally, hostapd was an optional user space component for Host AP
driver. It adds more features to the basic IEEE 802.11 management driver. It adds more features to the basic IEEE 802.11 management

View file

@ -7,7 +7,7 @@
# file and hostapd will be started during system boot. An example configuration # file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
# #
#DAEMON_CONF="" #DAEMON_CONF="/etc/hostapd.conf"
# Additional daemon options to be appended to hostapd command:- # Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more) # -d show more debug messages (-dd for even more)

View file

@ -47,6 +47,8 @@ override_dh_install:
dh_install dh_install
install --mode=755 -D debian/ifupdown/hostapd.sh \ install --mode=755 -D debian/ifupdown/hostapd.sh \
debian/hostapd-realtek/etc/hostapd/ifupdown.sh debian/hostapd-realtek/etc/hostapd/ifupdown.sh
install --mode=644 -D debian/config/hostapd.conf \
debian/hostapd-realtek/etc/hostapd.conf
override_dh_installchangelogs: override_dh_installchangelogs:
dh_installchangelogs --package=hostapd-realtek hostapd/ChangeLog dh_installchangelogs --package=hostapd-realtek hostapd/ChangeLog
@ -57,6 +59,10 @@ override_dh_gencontrol:
override_dh_builddeb: override_dh_builddeb:
dh_builddeb -- -Zxz -z6 dh_builddeb -- -Zxz -z6
override_dh_installinit:
dh_installinit --name=hostapd
### end dh overrides ### end dh overrides
%: %:

View file

@ -0,0 +1,28 @@
ssid=SSID
interface=wlan0
hw_mode=g
channel=5
driver=nl80211
bridge=br0
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=2
preamble=1
wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
#country_code=SI
#ieee80211d=1
#5 Ghz example config
#hw_mode=a
#channel=108
#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]

View file

@ -32,7 +32,8 @@ Depends: ${shlibs:Depends},
lsb-base lsb-base
Breaks: initscripts (<< 2.88dsf-13.3) Breaks: initscripts (<< 2.88dsf-13.3)
Provides: hostapd Provides: hostapd
Conflicts: hostapd-realtek Conflicts: hostapd, hostapd-realtek, armbian-hostapd
Replaces: hostapd, hostapd-realtek, armbian-hostapd
Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
Originally, hostapd was an optional user space component for Host AP Originally, hostapd was an optional user space component for Host AP
driver. It adds more features to the basic IEEE 802.11 management driver. It adds more features to the basic IEEE 802.11 management

View file

@ -7,7 +7,7 @@
# file and hostapd will be started during system boot. An example configuration # file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
# #
#DAEMON_CONF="" #DAEMON_CONF="/etc/hostapd.conf"
# Additional daemon options to be appended to hostapd command:- # Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more) # -d show more debug messages (-dd for even more)

View file

@ -47,6 +47,8 @@ override_dh_install:
dh_install dh_install
install --mode=755 -D debian/ifupdown/hostapd.sh \ install --mode=755 -D debian/ifupdown/hostapd.sh \
debian/hostapd/etc/hostapd/ifupdown.sh debian/hostapd/etc/hostapd/ifupdown.sh
install --mode=644 -D debian/config/hostapd.conf \
debian/hostapd-realtek/etc/hostapd.conf
override_dh_installchangelogs: override_dh_installchangelogs:
dh_installchangelogs --package=hostapd hostapd/ChangeLog dh_installchangelogs --package=hostapd hostapd/ChangeLog

View file

@ -257,9 +257,9 @@ addtorepo()
# add all deb files to repository # add all deb files to repository
# parameter "remove" dumps all and creates new # parameter "remove" dumps all and creates new
# function: cycle trough distributions # function: cycle trough distributions
local distributions=("wheezy" "jessie" "trusty" "xenial") local distributions=("wheezy" "jessie" "trusty" "xenial")
for release in "${distributions[@]}"; do for release in "${distributions[@]}"; do
# let's drop from publish if exits # let's drop from publish if exits
if [[ -n $(aptly publish list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release) ]]; then if [[ -n $(aptly publish list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release) ]]; then
aptly publish drop -config=config/aptly.conf $release > /dev/null 2>&1 aptly publish drop -config=config/aptly.conf $release > /dev/null 2>&1
@ -274,14 +274,14 @@ addtorepo()
if [[ $1 == replace ]]; then if [[ $1 == replace ]]; then
local replace=true local replace=true
else else
local replace=false local replace=false
fi fi
# create local repository if not exist # create local repository if not exist
if [[ -z $(aptly repo list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release) ]]; then if [[ -z $(aptly repo list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release) ]]; then
display_alert "Creating section" "$release" "info" display_alert "Creating section" "$release" "info"
aptly repo create -config=config/aptly.conf -distribution=$release -component="main" -comment="Armbian main repository" $release aptly repo create -config=config/aptly.conf -distribution=$release -component="main" -comment="Armbian main repository" $release
fi fi
if [[ -z $(aptly repo list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release"-utils") ]]; then if [[ -z $(aptly repo list -config=config/aptly.conf -raw | awk '{print $(NF)}' | grep $release"-utils") ]]; then
aptly repo create -config=config/aptly.conf -distribution=$release -component="utils" -comment="Armbian utilities" "$release"-utils aptly repo create -config=config/aptly.conf -distribution=$release -component="utils" -comment="Armbian utilities" "$release"-utils
@ -290,7 +290,7 @@ addtorepo()
aptly repo create -config=config/aptly.conf -distribution=$release -component="desktop" -comment="Armbian desktop" "$release"-desktop aptly repo create -config=config/aptly.conf -distribution=$release -component="desktop" -comment="Armbian desktop" "$release"-desktop
fi fi
# create local repository if not exist # create local repository if not exist
# adding main # adding main
if find $POT -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then if find $POT -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then
display_alert "Adding to repository $release" "main" "ext" display_alert "Adding to repository $release" "main" "ext"
@ -299,32 +299,32 @@ addtorepo()
display_alert "Not adding $release" "main" "wrn" display_alert "Not adding $release" "main" "wrn"
fi fi
# adding utils # adding utils
if find ${POT}extra/$release/utils -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then if find ${POT}extra/$release/utils -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then
display_alert "Adding to repository $release" "utils" "ext" display_alert "Adding to repository $release" "utils" "ext"
aptly repo add -force-replace=${replace} -config=config/aptly.conf "$release"-utils ${POT}extra/$release/utils/*.deb aptly repo add -force-replace=${replace} -config=config/aptly.conf "$release"-utils ${POT}extra/$release/utils/*.deb
else else
display_alert "Not adding $release" "utils" "wrn" display_alert "Not adding $release" "utils" "wrn"
fi fi
# adding desktop # adding desktop
if find ${POT}extra/$release/desktop -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then if find ${POT}extra/$release/desktop -maxdepth 1 -type f -name "*.deb" 2>/dev/null | grep -q .; then
display_alert "Adding to repository $release" "desktop" "ext" display_alert "Adding to repository $release" "desktop" "ext"
aptly repo add -force-replace=${replace} -config=config/aptly.conf "$release"-desktop ${POT}extra/$release/desktop/*.deb aptly repo add -force-replace=${replace} -config=config/aptly.conf "$release"-desktop ${POT}extra/$release/desktop/*.deb
else else
display_alert "Not adding $release" "desktop" "wrn" display_alert "Not adding $release" "desktop" "wrn"
fi fi
# publish # publish
aptly publish -passphrase=$GPG_PASS -origin=Armbian -label=Armbian -config=config/aptly.conf -component=main,utils,desktop \ aptly publish -passphrase=$GPG_PASS -origin=Armbian -label=Armbian -config=config/aptly.conf -component=main,utils,desktop \
--distribution=$release repo $release $release"-utils" $release"-desktop" > /dev/null 2>&1 --distribution=$release repo $release $release"-utils" $release"-desktop" > /dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
display_alert "Publishing failed" "$release" "err" display_alert "Publishing failed" "$release" "err"
exit 0 exit 0
fi fi
done done
display_alert "List of local repos" "local" "info" display_alert "List of local repos" "local" "info"
(aptly repo list -config=config/aptly.conf) | egrep packages (aptly repo list -config=config/aptly.conf) | egrep packages
} }
# prepare_host # prepare_host