From Fedora Project Wiki

 
(29 intermediate revisions by 3 users not shown)
Line 11: Line 11:
== About ==
== About ==


After learning a bit of programming, I was attracted by the networking world. I got from petty Pascal/C++ projects through web development using ugly PHP and later Python, to a freelancing work with most of the projects in server administration, network equipment configuration and a bit of programming. Most people in the business know me from my conference talks and articles.
After learning a bit of programming, I was attracted by the networking world. I got from petty Pascal/C++ projects through web development using PHP and later Python, to years of freelancing work with most of the projects in server administration, network equipment configuration and a bit of programming. I was active in the community, wrote articles and spoke at conferences which finally led to my joining Red Hat in May 2012 to work on NetworkManager. I was already a Fedora user and package maintainer at that time. Since August 2013 I'm working on various network related packages and projects.


One of my conference talk brought me an offer from Red Hat, which I joined in May 2012 to work on NetworkManager. I was already a Fedora user and package maintainer at that time. Since August 2013 I'm no longer working as a regular NetworkManager developer (staying an upstream contributor, though). Even before that I tried to put my hands on a number of other projects via bug reports, tests and code. I'm now working on name resolution features in Fedora including a local DNS/DNSSEC resolver setup. I'm also interested in various network-related standards and especially bugs and bad assumptions in IETF documents.
== Projects ==


== Wiki resources ==
Fedora projects:
 
* [https://github.com/pavlix/network-testing User space networking test suite] (owner)
* [https://github.com/pavlix/netresolve Non-blocking network name resolution library and tools] (owner)
* [https://github.com/pavlix/gentoo-rpm Gentoo ebuilds for Fedora and CentOS development] (owner)
* [https://github.com/pavlix/fptool Wrapper over Fedora package maintainance tools] (owner)
* DNSSEC in Fedora (contributor)
* IPv6 and dual-stack networking (contributor)
* [https://wiki.gnome.org/Projects/NetworkManager NetworkManager development] (contributor, former developer
 
Fedora wiki documentation:


* [[Networking]] – A starting point for information related to networking.
* [[Networking]] – A starting point for information related to networking.
* [[Tools/NetworkManager]] – NetworkManager information page.
* [[Tools/NetworkManager]] – NetworkManager information page.
* [[QA/Networking]] – Dual-stack networking issues in Fedora.


Contributions are welcome.
(Contributions are welcome.)
 
== Packages ==
 
=== Maintainer ===
 
* aiccu (IPv6 tunneling client)
* connman
* getdns (with Paul Wouters)
* hostname (taken over from Tomáš Hozza)
* racoon2
* radvd (taken over from Petr Písař)
* strongswan
 
Help with specific features or integration issues welcome.
 
=== Co-maintainer ===
 
* bind
* bind10
* NetworkManager-ssh
* rsync
* squid
 
== Upstream contributions ==
 
* [https://sourceware.org/git/?p=netresolve.git;a=blob;f=README;hb=HEAD netresolve] (author)
* dnssec-trigger
** NetworkManager integration scripts (with [[User:thozza|Tomáš Hozza]])
** systemd integration
* NetworkManager
** [http://bugzilla.gnome.org/show_bug.cgi?id=663602 Building on any distribution]
** Virtual device support (bridging/bonding, with others)
** Valgrind and code coverage support for tests
** [http://bugzilla.gnome.org/show_bug.cgi?id=683173 Separate platform interaction module] (nm-platform, with [[User:danw|Dan Winship]])
*** Refactored NetworkManager's bridging/bonding/vlan configuration
*** Refactored NetworkManager's IPv4/IPv6 configuration
** Userspace IPv6 autoconfiguration (nm-rdisc/libndp, with [[User:jpirko|Jiří Pírko]])
*** Getting IPv6 autoconf features on par with IPv4
*** Avoiding loads of kernel IPv6 bugs and design flaws
** Runtime (non-persistent) configuration support (with [[User:danw|Dan Winship]] and [[User:dcbw|Dan Williams]])
** A ''lot'' of bug triaging
 
== Upstream bug reporting, triaging and minor contributions ==
 
* glibc
** The getaddrinfo() support is very complicated while not giving correct results in ''many'' cases.
** Name resolution patches
* kernel
** Network configuration is a real pain.
** Kernel IPv6 autoconfiguration is only designed for trivial use cases and is very buggy.
* libnl
** Most of the advanced stuff is very buggy.
* rpmdevtools
** Minor patches
* avahi
** Missing for IPv6 link-local addresses.
** IPv6 disabled by default.
** Problems with duplicates in discovery.
 
== Daily usage ==
 
=== Distributions ===
 
* Gentoo
* Fedora/CentOS
* Debian
* OpenWRT
 
=== Desktop ===


* Gnome 3 – Seeking something more mature and stable
Packages:
* Gnome Terminal
* Evolution (for IMAP/SMTP mail) – Seeking something more mature and stable
* Empathy/Telepathy (for jabber and IRC) – Seeking something more mature and stable
* Evince
* Firefox


=== Development ===
[https://admin.fedoraproject.org/pkgdb/packager/pavlix/ Fedora Package Database].


* vim
== Other resources ==
* gcc
* make, autotools
* gdb
* valgrind


=== Presentation ===
Fedora features:


* LaTeX/Beamer
* [[Changes/Default_Local_DNS_Resolver]]


== Idea pages ==
Ideas:


* [[Networking/Ideas/ServiceOrdering]]
* [[Networking/Ideas/NameResolution]]
* [[Networking/Ideas/NameResolution]]
* [[Networking/Ideas/NetworkManagerMethods]]
* [[Networking/Ideas/NetworkManagerMethods]]
Line 123: Line 57:
== Fedora notes ==
== Fedora notes ==


=== Make a scratch build from locally generated SRPM ===
=== Simple maintainance tasks ===
 
==== Make a fix and a build ====
 
<pre>
bug=123456
message="do something"
 
# ... add/modify files ...
rpmdev-bumpspec *.spec -c "Resolves: #$bug - $message"
fedpkg commit -c
# ... check using gitk ...
fedpkg push && fedpkg build
</pre>
 
==== Make a scratch build from locally generated SRPM ====


<pre>
<pre>
Line 129: Line 78:
</pre>
</pre>


=== Bump a rawhide package to a newer version ===
==== Bump a rawhide package to a newer version ====


In the package git directory:
In the package git directory:


<pre>
<pre>
VERSION=...
version=...


# Prepare a commit
fedpkg switch-branch master
fedpkg switch-branch master
rpmdev-bumpspec --new="$VERSION" --comment="new version $VERSION" *.spec
rpmdev-bumpspec --new="$version" --comment="new version $version" *.spec
spectool -g *.spec
spectool -g *.spec && fedpkg new-sources `spectool -l *.spec | grep / | sed 's/.*\///'`
fedpkg new-sources `spectool -l *.spec | grep / | sed 's/.*\///'`
fedpkg commit -c
fedpkg commit -c
fedpkg push
 
fedpkg build
# Test it
fedpkg build --scratch --srpm
 
# Create a public build
fedpkg push && fedpkg build
</pre>
</pre>


Line 149: Line 102:
* https://fedorahosted.org/rpmdevtools/attachment/ticket/14
* https://fedorahosted.org/rpmdevtools/attachment/ticket/14


=== Prepare rawhide to replace branches ===
==== Prepare rawhide to replace branches ====


Warning: This method discards changes in all branches and should only be used after all of the important changes are incorporated into master. Also, it is only suitable for packages where it's practical to maintain the same version in branches as in rawhide.
Warning: This method discards changes in all branches and should only be used after all of the important changes are incorporated into master. Also, it is only suitable for packages where it's practical to maintain the same version in branches as in rawhide.


<pre>
<pre>
BRANCHES="f20 f19"
branches="f20 f19"


# Fake-merge all branches into master:
# Fake-merge all branches into master:
for branch in $BRANCHES; do
for branch in $branches; do
     fedpkg switch-branch master
     fedpkg switch-branch master
     git merge -s ours $branch
     git merge -s ours $branch
Line 169: Line 122:
</pre>
</pre>


=== Update branches to match rawhide ===
==== Update branches to match rawhide and build them ====


Use the above technique to prepare rawhide if branches can't be fast forwarded to rawhide.
Use the above technique to prepare rawhide if branches can't be fast forwarded to rawhide.


<pre>
<pre>
BRANCHES="f20 f19"
branches="f21 f20"


# Fast-forward all branches to master HEAD:
# Fast-forward all branches to master HEAD:
for branch in $BRANCHES; do
for branch in $branches; do
     fedpkg switch-branch $branch
     fedpkg switch-branch $branch
     git merge --ff-only master
     git merge --ff-only master
Line 188: Line 141:
</pre>
</pre>


=== Create a new package ===
==== Issue updates ====
 
<pre>
branches="f21 f20"
type=bugfix
bugs=
comment="Bug fix update."
 
# Create updates for all branches
for branch in $branches; do
    fedpkg switch-branch $branch
    bodhi --new --type="$type" --bugs="$bugs" --notes="$comment" --close-bugs `fedpkg verrel`
done
 
# Switch back to master
fedpkg switch-branch master
</pre>
 
Resources:
 
* [https://apps.fedoraproject.org/packages/ Package version in Fedora and EPEL]
* [https://admin.fedoraproject.org/updates/ Package updates]
 
=== Patchwork ===
 
==== Using vim ====
 
Open three panes containing (1) patch to be edited, (2) patched file and (3) rejected hunks.
 
<pre>
package=...
version=...
patch=...
file=...
 
vim -O $patch $package-$version/$file{,.rej}
</pre>
 
==== Using git ====
 
Warning: Untested. I used a similar command but lost it.
 
 
<pre>
package=...
version=...
dir=/path/to/upstream/workdir
 
(echo cd $dir; for patch in `awk '/^Patch[0-9]*: / { print $2 }' *.spec`; do echo -n "git apply --index "; realpath $patch; echo git commit -m $patch; done) | sh
</pre>
 
=== New package ===


==== Create a local Git repository ====
==== Create a local Git repository ====


<pre>
<pre>
PACKAGE=...
package=...
EDITOR=...
editor=...


git init $PACKAGE
git init $package
cd $PACKAGE
cd $package


$EDITOR $PACKAGE.spec
$editor $package.spec
git add $PACKAGE.spec
git add $package.spec


fedpkg new-sources `spectool -l *.spec | grep / | sed 's/.*\///'`
fedpkg new-sources `spectool -l *.spec | grep / | sed 's/.*\///'`


rpmdev-bumpspec $PACKAGE.spec -m 'initial build'
rpmdev-bumpspec $package.spec -m 'initial build'
fedpkg commit -c
fedpkg commit -c
</pre>
</pre>
Line 211: Line 215:


<pre>
<pre>
RAWHIDE=f21
rawhide=f22


fedpkg --dist $RAWHIDE srpm
fedpkg --dist $rawhide srpm
fedora-create-review --no-scratch-build *.spec *.src.rpm
fedora-create-review --no-scratch-build *.spec *.src.rpm
</pre>
</pre>
Line 220: Line 224:


<pre>
<pre>
RAWHIDE=f21
rawhide=f22
MESSAGE="incorporated review feedback"
message="incorporated review feedback"


rpmdev-bumpspec *.spec -m "$MESSAGE"
rpmdev-bumpspec *.spec -m "$message"
fedpkg commit -c
fedpkg commit -c


fedpkg --dist $RAWHIDE srpm
fedpkg --dist $rawhide srpm
fedora-create-review --amend --no-scratch-build *.spec *.src.rpm
fedora-create-review --amend --no-scratch-build *.spec *.src.rpm
</pre>
</pre>
Line 242: Line 246:
ln -s /etc/mock/fedora-devel-x86_64.cfg /etc/mock/default.cfg
ln -s /etc/mock/fedora-devel-x86_64.cfg /etc/mock/default.cfg


MOCKUSER=...
mockuser=...


usermod -a -G mock $MOCKUSER
usermod -a -G mock $mockuser
</pre>
</pre>


Line 250: Line 254:


<pre>
<pre>
NAME=...
name=...


fedora-review -n $NAME
fedora-review -n $name
</pre>
</pre>


Line 258: Line 262:


<pre>
<pre>
BZ=...
bz=...


fedora-review -b $BZ
fedora-review -b $bz
</pre>
</pre>



Latest revision as of 13:29, 28 October 2016

Mail: psimerda AT redhat DOT com, pavlix AT pavlix DOT net

Jabber: pavlix AT pavlix DOT net

IRC Freenode: pavlix (#nm, #gentoo, ...)

Phone: +420 775 996 256

Timezone: Europe/Prague (CET), sometimes available through later hours

About

After learning a bit of programming, I was attracted by the networking world. I got from petty Pascal/C++ projects through web development using PHP and later Python, to years of freelancing work with most of the projects in server administration, network equipment configuration and a bit of programming. I was active in the community, wrote articles and spoke at conferences which finally led to my joining Red Hat in May 2012 to work on NetworkManager. I was already a Fedora user and package maintainer at that time. Since August 2013 I'm working on various network related packages and projects.

Projects

Fedora projects:

Fedora wiki documentation:

(Contributions are welcome.)

Packages:

Fedora Package Database.

Other resources

Fedora features:

Ideas:

Fedora notes

Simple maintainance tasks

Make a fix and a build

bug=123456
message="do something"

# ... add/modify files ...
rpmdev-bumpspec *.spec -c "Resolves: #$bug - $message"
fedpkg commit -c
# ... check using gitk ...
fedpkg push && fedpkg build

Make a scratch build from locally generated SRPM

fedpkg build --scratch --srpm

Bump a rawhide package to a newer version

In the package git directory:

version=...

# Prepare a commit
fedpkg switch-branch master
rpmdev-bumpspec --new="$version" --comment="new version $version" *.spec
spectool -g *.spec && fedpkg new-sources `spectool -l *.spec | grep / | sed 's/.*\///'`
fedpkg commit -c

# Test it
fedpkg build --scratch --srpm

# Create a public build
fedpkg push && fedpkg build

Requires development version, see:

Prepare rawhide to replace branches

Warning: This method discards changes in all branches and should only be used after all of the important changes are incorporated into master. Also, it is only suitable for packages where it's practical to maintain the same version in branches as in rawhide.

branches="f20 f19"

# Fake-merge all branches into master:
for branch in $branches; do
    fedpkg switch-branch master
    git merge -s ours $branch
done

# Build a new release
rpmdev-bumpspec
fedpkg commit -c
fedpkg push
fedpkg build

Update branches to match rawhide and build them

Use the above technique to prepare rawhide if branches can't be fast forwarded to rawhide.

branches="f21 f20"

# Fast-forward all branches to master HEAD:
for branch in $branches; do
    fedpkg switch-branch $branch
    git merge --ff-only master
    fedpkg push
    fedpkg build --nowait
done

# Switch back to master
fedpkg switch-branch master

Issue updates

branches="f21 f20"
type=bugfix
bugs=
comment="Bug fix update."

# Create updates for all branches
for branch in $branches; do
    fedpkg switch-branch $branch
    bodhi --new --type="$type" --bugs="$bugs" --notes="$comment" --close-bugs `fedpkg verrel`
done

# Switch back to master
fedpkg switch-branch master

Resources:

Patchwork

Using vim

Open three panes containing (1) patch to be edited, (2) patched file and (3) rejected hunks.

package=...
version=...
patch=...
file=...

vim -O $patch $package-$version/$file{,.rej}

Using git

Warning: Untested. I used a similar command but lost it.


package=...
version=...
dir=/path/to/upstream/workdir

(echo cd $dir; for patch in `awk '/^Patch[0-9]*: / { print $2 }' *.spec`; do echo -n "git apply --index "; realpath $patch; echo git commit -m $patch; done) | sh

New package

Create a local Git repository

package=...
editor=...

git init $package
cd $package

$editor $package.spec
git add $package.spec

fedpkg new-sources `spectool -l *.spec | grep / | sed 's/.*\///'`

rpmdev-bumpspec $package.spec -m 'initial build'
fedpkg commit -c

Create a review request

rawhide=f22

fedpkg --dist $rawhide srpm
fedora-create-review --no-scratch-build *.spec *.src.rpm

Update a review request

rawhide=f22
message="incorporated review feedback"

rpmdev-bumpspec *.spec -m "$message"
fedpkg commit -c

fedpkg --dist $rawhide srpm
fedora-create-review --amend --no-scratch-build *.spec *.src.rpm

Requires:

Review a new package

System configuration:

yum install @fedora-packager fedora-review
ln -s /etc/mock/fedora-devel-x86_64.cfg /etc/mock/default.cfg

mockuser=...

usermod -a -G mock $mockuser

Review local files:

name=...

fedora-review -n $name

Review bugzilla:

bz=...

fedora-review -b $bz

Fedora tools on Gentoo

emerge -av layman
echo source /var/lib/layman/make.conf > /etc/portage.make.conf
layman -a ixit
mkdir -p /etc/portage/sets
cat > /etc/portage/sets/fedora-packaging <<EOF
dev-util/fedora-packager
dev-util/quilt
EOF
emerge -av @fedora-packaging